[dev] Re: [patch] to fix imp cancel message with attachments problem

Rich Bartell rwb at bartellonline.com
Sat Oct 23 14:06:01 PDT 2004


On Sat, 23 Oct 2004, Rich Bartell wrote:

<snip>
> Upon digging into the code, I noticed a difference in how the javascript code 
> for the cancel function was created between those composing in a popup window 
> (which worked) and those composing in the same window (which didn't).
<snip>

Actually, I typed too soon on this - while the popup window version 
doesn't give the false message sent confirmation when "Cancel Message" is 
clicked (because the confirmation option only applies when the compose in 
a new window is not selected), it does fail to delete the temporary file 
with the attachment, because of a type now also corrected by the attached 
revised version of the patch . . .

Rich
-------------- next part --------------
--- compose.php.orig	2004-10-24 01:56:52.000000000 +0500
+++ compose.php	2004-10-24 01:58:07.000000000 +0500
@@ -1148,7 +1148,7 @@
         $url = IMP::addParameter(Horde::selfUrl(), 'actionID=' . CANCEL_COMPOSE);
         $url = IMP::addParameter($url, 'files=' . rawurlencode(serialize($_POST['attachments_file'])));
         $url = IMP::addParameter($url, 'popup=1');
-        $cancel_js = 'self.location.href=\'' . $url . ';\'';
+        $cancel_js = 'self.location.href=\'' . $url . '\';';
     } else {
         $cancel_js = 'self.close();';
     }
@@ -1156,7 +1156,7 @@
     /* If the attachments list is not empty, we must reload this page and
        delete the attachments. */
     if (!empty($_POST['attachments_file'])) {
-        $url = IMP::addParameter(mailboxReturnUrl(Horde::selfUrl()), 'actionID=' . CANCEL_COMPOSE);
+        $url = IMP::addParameter(Horde::selfUrl(), 'actionID=' . CANCEL_COMPOSE);
         $url = IMP::addParameter($url, 'files=' . rawurlencode(serialize($_POST['attachments_file'])));
         $cancel_js = 'window.location = \'' . $url . '\';';
     } else {


More information about the dev mailing list