From bdec8e4165e2138691530de6f25922190e5de5e6 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 29 Sep 2009 23:50:19 -0600 Subject: [PATCH] More places to check uidvalidity. --- imp/lib/Filter.php | 2 ++ imp/lib/Spam.php | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/imp/lib/Filter.php b/imp/lib/Filter.php index bb94a351f..97e72326c 100644 --- a/imp/lib/Filter.php +++ b/imp/lib/Filter.php @@ -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(); diff --git a/imp/lib/Spam.php b/imp/lib/Spam.php index 98cf742eb..b958930e7 100644 --- a/imp/lib/Spam.php +++ b/imp/lib/Spam.php @@ -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; } + } -- 2.11.0