More places to check uidvalidity.
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 30 Sep 2009 05:50:19 +0000 (23:50 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 30 Sep 2009 17:41:51 +0000 (11:41 -0600)
imp/lib/Filter.php
imp/lib/Spam.php

index bb94a35..97e7232 100644 (file)
@@ -112,6 +112,8 @@ class IMP_Filter
         /* Get the list of from addresses. */
         $addr = array();
         foreach ($msgList as $mbox => $msgIndices) {
+            $GLOBALS['imp_imap']->checkUidvalidity($mbox);
+
             foreach ($msgIndices as $idx) {
                 $contents = IMP_Contents::singleton($idx . IMP::IDX_SEP . $mbox);
                 $hdr = $contents->getHeaderOb();
index 98cf742..b958930 100644 (file)
@@ -17,8 +17,8 @@ class IMP_Spam
      * Reports a list of messages as spam, based on the local configuration
      * parameters.
      *
-     * @param mixed $indices   See IMP::parseIndicesList().
-     * @param string $action   Either 'spam' or 'notspam'.
+     * @param mixed $indices  See IMP::parseIndicesList().
+     * @param string $action  Either 'spam' or 'notspam'.
      *
      * @return integer  1 if messages have been deleted, 2 if messages have
      *                  been moved.
@@ -37,6 +37,12 @@ class IMP_Spam
         $report_count = 0;
 
         foreach ($msgList as $mbox => $msgIndices) {
+            try {
+                $GLOBALS['imp_imap']->checkUidvalidity($mbox);
+            } catch (Horde_Exception $e) {
+                continue;
+            }
+
             foreach ($msgIndices as $idx) {
                 /* Fetch the raw message contents (headers and complete
                  * body). */
@@ -208,4 +214,5 @@ class IMP_Spam
 
         return $delete_spam;
     }
+
 }