From 58c2798fae7749cf7b4aee471a696aed389d0941 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sun, 07 Jun 2015 11:54:01 -0400
Subject: [PATCH] Implemented password prompt when entering compose page of encrypted message
---
plugins/enigma/enigma.php | 26 +++++++++++++++++++-------
1 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/plugins/enigma/enigma.php b/plugins/enigma/enigma.php
index 3b9aa0b..1ac619c 100644
--- a/plugins/enigma/enigma.php
+++ b/plugins/enigma/enigma.php
@@ -1,5 +1,6 @@
<?php
-/*
+
+/**
+-------------------------------------------------------------------------+
| Enigma Plugin for Roundcube |
| |
@@ -14,11 +15,10 @@
+-------------------------------------------------------------------------+
*/
-/*
- This class contains only hooks and action handlers.
- Most plugin logic is placed in enigma_engine and enigma_ui classes.
-*/
-
+/**
+ * This class contains only hooks and action handlers.
+ * Most plugin logic is placed in enigma_engine and enigma_ui classes.
+ */
class enigma extends rcube_plugin
{
public $task = 'mail|settings';
@@ -26,7 +26,7 @@
public $engine;
public $ui;
- private $env_loaded = false;
+ private $env_loaded = false;
/**
@@ -51,6 +51,8 @@
}
// message composing
else if ($this->rc->action == 'compose') {
+ $this->add_hook('message_compose_body', array($this, 'message_compose'));
+
$this->load_ui();
$this->ui->init();
}
@@ -438,6 +440,16 @@
}
/**
+ * Handle message_compose_body hook
+ */
+ function message_compose($p)
+ {
+ $this->load_ui();
+
+ return $this->ui->message_compose($p);
+ }
+
+ /**
* Handler for refresh hook.
*/
function refresh($p)
--
Gitblit v1.9.1