| | |
| | | $rcmail = rcmail::get_instance(); |
| | | $this->rc = $rcmail; |
| | | |
| | | $section = rcube_utils::get_input_value('_section', rcube_utils::INPUT_GET); |
| | | |
| | | if ($this->rc->task == 'mail') { |
| | | // message parse/display hooks |
| | | $this->add_hook('message_part_structure', array($this, 'parse_structure')); |
| | |
| | | $this->register_action('plugin.enigma', array($this, 'preferences_ui')); |
| | | |
| | | // grab keys/certs management iframe requests |
| | | $section = rcube_utils::get_input_value('_section', rcube_utils::INPUT_GET); |
| | | if ($this->rc->action == 'edit-prefs' && preg_match('/^enigma(certs|keys)/', $section)) { |
| | | $this->load_ui(); |
| | | $this->ui->init($section); |
| | |
| | | */ |
| | | function parse_structure($p) |
| | | { |
| | | $struct = $p['structure']; |
| | | // $struct = $p['structure']; |
| | | |
| | | if ($p['mimetype'] == 'text/plain' || $p['mimetype'] == 'application/pgp') { |
| | | $this->parse_plain($p); |
| | |
| | | function message_load($p) |
| | | { |
| | | $this->message = $p['object']; |
| | | |
| | | |
| | | // handle attachments vcard attachments |
| | | foreach ((array)$this->message->attachments as $attachment) { |
| | | if ($this->is_keys_part($attachment)) { |
| | |
| | | } |
| | | } |
| | | // the same with message bodies |
| | | foreach ((array)$this->message->parts as $idx => $part) { |
| | | foreach ((array)$this->message->parts as $part) { |
| | | if ($this->is_keys_part($part)) { |
| | | $this->keys_parts[] = $part->mime_id; |
| | | $this->keys_bodies[] = $part->mime_id; |