Bug #8066: Fix empty trash when in trash mailbox
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 12 Mar 2009 18:48:57 +0000 (12:48 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 12 Mar 2009 18:48:57 +0000 (12:48 -0600)
imp/lib/Message.php

index 08769a3..723587b 100644 (file)
@@ -648,7 +648,9 @@ class IMP_Message
     {
         global $imp_search, $notification, $prefs;
 
-        $trash_folder = ($prefs->getValue('use_trash')) ? IMP::folderPref($prefs->getValue('trash_folder'), true) : null;
+        $trash_folder = ($prefs->getValue('use_trash'))
+            ? IMP::folderPref($prefs->getValue('trash_folder'), true)
+            : null;
 
         foreach ($mbox_list as $mbox) {
             $display_mbox = IMP::displayFolder($mbox);
@@ -674,7 +676,7 @@ class IMP_Message
                 }
 
                 if (empty($trash_folder) || ($trash_folder == $mbox)) {
-                    $this->flagAllInMailbox(array('\\deleted'), $mbox, true);
+                    $this->flagAllInMailbox(array('\\deleted'), array($mbox), true);
                     $this->expungeMailbox(array($mbox => 1));
                 } else {
                     $ret = $GLOBALS['imp_imap']->ob->search($mbox);