From: Michael M Slusarz Date: Fri, 20 Aug 2010 21:04:54 +0000 (-0600) Subject: Use composeCache consistently to make the javascript work properly on the redirect... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c15384659293c558d80cc752fc73e89c568c7803;p=horde.git Use composeCache consistently to make the javascript work properly on the redirect page --- diff --git a/imp/js/fullmessage-dimp.js b/imp/js/fullmessage-dimp.js index 049fc5233..2026401ae 100644 --- a/imp/js/fullmessage-dimp.js +++ b/imp/js/fullmessage-dimp.js @@ -58,9 +58,12 @@ var DimpFullmessage = { var i, id, r = result.response; - if (r.type == 'forward_redirect') { - $('redirect_composeCache').setValue(r.imp_compose); - } else { + if (r.imp_compose) { + $('composeCache').setValue(r.imp_compose); + } + + + if (r.type != 'forward_redirect') { if (!r.opts) { r.opts = {}; } @@ -73,10 +76,6 @@ var DimpFullmessage = { $('identity', 'last_identity').invoke('setValue', id); DimpCompose.fillForm((i.id[2]) ? ("\n" + i.sig + r.body) : (r.body + "\n" + i.sig), r.header, r.opts); - - if (r.imp_compose) { - $('composeCache').setValue(r.imp_compose); - } } }, diff --git a/imp/lib/Ajax/Application.php b/imp/lib/Ajax/Application.php index 6a0f3242e..de4ad6f41 100644 --- a/imp/lib/Ajax/Application.php +++ b/imp/lib/Ajax/Application.php @@ -1554,7 +1554,7 @@ class IMP_Ajax_Application extends Horde_Core_Ajax_Application * * Variables used: *
-     * 'redirect_composeCache' - (string) The IMP_Compose cache identifier.
+     * 'composeCache' - (string) The IMP_Compose cache identifier.
      * 'redirect_to' - (string) The address(es) to redirect to.
      * 
* @@ -1573,7 +1573,7 @@ class IMP_Ajax_Application extends Horde_Core_Ajax_Application $result->success = 1; try { - $imp_compose = $GLOBALS['injector']->getInstance('IMP_Compose')->getOb($this->_vars->redirect_composeCache); + $imp_compose = $GLOBALS['injector']->getInstance('IMP_Compose')->getOb($this->_vars->composeCache); $imp_compose->sendRedirectMessage($this->_vars->redirect_to); $result->mbox = $imp_compose->getMetadata('mailbox'); diff --git a/imp/templates/dimp/chunks/compose.php b/imp/templates/dimp/chunks/compose.php index 1dd485985..638229714 100644 --- a/imp/templates/dimp/chunks/compose.php +++ b/imp/templates/dimp/chunks/compose.php @@ -160,7 +160,7 @@ $compose_link->pathInfo = 'addAttachment';