summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-12-05 19:10:41 +0000
committeralecpl <alec@alec.pl>2009-12-05 19:10:41 +0000
commita82dcd420a0b5266c543aa184fc0628f823e1d9f (patch)
treef8b6a7939625418def8d5bd79389a26f624fdfbe
parent724cc1f0d0af029b829294cf5ca9787225f117df (diff)
- Plugin API: added 'message_compose_body' hook (#1486285)
-rw-r--r--CHANGELOG1
-rw-r--r--program/steps/mail/compose.inc9
2 files changed, 6 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index fe5a3dc94..bf126dfe4 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG RoundCube Webmail
===========================
+- Plugin API: added 'message_compose_body' hook (#1486285)
- Fix counters of all folders are checked in 'getunread' action with check_all_folders disabled (#1486128)
- Fix displaying alternative parts in messages of type message/rfc822 (#1486246)
- Fix possible messages exposure when using Roundcube behind a proxy (#1486281)
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 3a8a776fe..2236d5f57 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -444,10 +444,11 @@ function rcmail_compose_body($attrib)
// load draft message body
else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT)
$body = rcmail_create_draft_body($body, $isHtml);
- }
- else if (!empty($_SESSION['compose']['param']['body']))
- {
- $body = $_SESSION['compose']['param']['body'];
+
+ $plugin = $RCMAIL->plugins->exec_hook('message_compose_body',
+ array('body' => $body, 'html' => $isHtml, 'mode' => $compose_mode));
+
+ $body = $plugin['body'];
}
$out = $form_start ? "$form_start\n" : '';