diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-09-08 11:27:59 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-09-08 11:27:59 +0200 |
commit | 6e6f9ce6a7d50ddff5d8485b7f76a51ae8f79d16 (patch) | |
tree | d1ab39ba2a128885734750d3852f7f657a70f990 /plugins | |
parent | 4baf96a4ca1621a267c10c67e84e80e6bf72dbfd (diff) |
Fix compatybility with contextmenu plugin
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/managesieve/managesieve.js | 2 | ||||
-rw-r--r-- | plugins/managesieve/managesieve.php | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/plugins/managesieve/managesieve.js b/plugins/managesieve/managesieve.js index cd0d5f3ca..8340b179d 100644 --- a/plugins/managesieve/managesieve.js +++ b/plugins/managesieve/managesieve.js @@ -930,7 +930,7 @@ function sieve_form_init() rcube_webmail.prototype.managesieve_create = function(force) { - if (!force && this.env.action != 'show' && !$('#'+this.env.contentframe).is(':visible')) { + if (!force && this.env.action != 'show') { var uid = this.message_list.get_single_selection(), lock = this.set_busy(true, 'loading'); diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php index 478f26b00..7a307e1fe 100644 --- a/plugins/managesieve/managesieve.php +++ b/plugins/managesieve/managesieve.php @@ -51,7 +51,9 @@ class managesieve extends rcube_plugin } else if ($this->rc->task == 'mail') { // register message hook - $this->add_hook('message_headers_output', array($this, 'mail_headers')); + if ($this->rc->action == 'show') { + $this->add_hook('message_headers_output', array($this, 'mail_headers')); + } // inject Create Filter popup stuff if (empty($this->rc->action) || $this->rc->action == 'show' @@ -192,9 +194,10 @@ class managesieve extends rcube_plugin function managesieve_actions() { // handle fetching email headers for the new filter form - if ($uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GPC)) { - $mailbox = $this->rc->get_storage()->get_folder(); - $message = new rcube_message($uid, $mailbox); + if ($uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST)) { + $uids = rcmail::get_uids(); + $mailbox = key($uids); + $message = new rcube_message($uids[$mailbox][0], $mailbox); $headers = $this->parse_headers($message->headers); $this->rc->output->set_env('sieve_headers', $headers); |