summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_message.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-07-31 08:55:56 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-07-31 08:55:56 +0000
commitb56aef6821d1ddf8b23431fd867e4e6b6ae8383d (patch)
treeb85f647a49a07d3a3a74866389b6904a4f387559 /roundcubemail/program/include/rcube_message.php
parenta31889f28a6127bac2d467b2d9aac5f9d09cf503 (diff)
Create plugin hook for encrypted message parts + add size property to text part in order to display it
git-svn-id: https://svn.roundcube.net/trunk@2821 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_message.php')
-rw-r--r--roundcubemail/program/include/rcube_message.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_message.php b/roundcubemail/program/include/rcube_message.php
index 374dc9059..0c469457c 100644
--- a/roundcubemail/program/include/rcube_message.php
+++ b/roundcubemail/program/include/rcube_message.php
@@ -323,8 +323,16 @@ class rcube_message
$p->ctype_primary = 'text';
$p->ctype_secondary = 'plain';
$p->body = rcube_label('encryptedmessage');
+ $p->size = strlen($p->body);
- $this->parts[] = $p;
+ // maybe some plugins are able to decode this encrypted message part
+ $data = $this->app->plugins->exec_hook('message_part_encrypted', array('object' => $this, 'struct' => $structure, 'part' => $p));
+ if (is_array($data['parts'])) {
+ $this->parts = array_merge($this->parts, $data['parts']);
+ }
+ else if ($data['part']) {
+ $this->parts[] = $p;
+ }
}
// message contains multiple parts
else if (is_array($structure->parts) && !empty($structure->parts)) {