How about I actually use the return value of expunge(), eh?
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 17 Mar 2009 20:14:50 +0000 (14:14 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 17 Mar 2009 20:16:17 +0000 (14:16 -0600)
I blame jet lag.

imp/lib/Message.php

index 5de531d..043528e 100644 (file)
@@ -631,16 +631,12 @@ class IMP_Message
 
         foreach ($process_list as $key => $val) {
             try {
-                $GLOBALS['imp_imap']->ob->expunge($key, array('ids' => is_array($val) ? $val : array()));
+                $update_list[$key] = $GLOBALS['imp_imap']->ob->expunge($key, array('ids' => is_array($val) ? $val : array(), 'list' => $msg_list));
 
                 $imp_mailbox = IMP_Mailbox::singleton($key);
                 if ($imp_mailbox->isBuilt()) {
                     $imp_mailbox->removeMsgs(is_array($val) ? array($key => $val) : true);
                 }
-
-                if ($msg_list) {
-                    $update_list[$key] = $val;
-                }
             } catch (Horde_Imap_Client_Exception $e) {}
         }