From: stekkel Date: Wed, 2 Jun 2004 15:31:12 +0000 (+0000) Subject: Also adapt the number of messages in a mailbox if the uidset is invalid. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ddd209f2bd6de43dcdb4f265bf606ce55adf1e99;p=squirrelmail.git Also adapt the number of messages in a mailbox if the uidset is invalid. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7587 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 2e343f43..eadabbc7 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -1911,7 +1911,7 @@ function handleMessageListForm($imapConnection,&$aMailbox,$sButton='',$aUid = ar foreach ($aUpdatedMsgs as $iUid => $aMsg) { if (isset($aMsg['FLAGS'])) { /** - * Only update the cached headers if the header is + * Only update the cached headers if the header is * cached. */ if (isset($aMailbox['MSG_HEADERS'][$iUid])) { @@ -1953,10 +1953,12 @@ function handleMessageListForm($imapConnection,&$aMailbox,$sButton='',$aUid = ar unset($aMailbox['MSG_HEADERS'][$iUid]); } $aMailbox['UIDSET'][$aMailbox['SETINDEX']] = array_keys($aUidSetDummy); - // update EXISTS info - $aMailbox['EXISTS'] -= $iExpungedMessages; } } + // update EXISTS info + if ($iExpungedMessages) { + $aMailbox['EXISTS'] -= (int) $iExpungedMessages; + } // Change the startMessage number if the mailbox was changed if (($aMailbox['PAGEOFFSET']+$iExpungedMessages-1) >= $aMailbox['EXISTS']) { $aMailbox['PAGEOFFSET'] = ($aMailbox['PAGEOFFSET'] > $aMailbox['LIMIT']) ?