Fixed problem that caused an error when deleting all messages on the last page of...
authorcigamit <cigamit@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 8 Sep 2004 03:28:33 +0000 (03:28 +0000)
committercigamit <cigamit@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 8 Sep 2004 03:28:33 +0000 (03:28 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8041 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
functions/mailbox_display.php

index 16437e11714642636834f630c3489ea911c2fe73..456d85ad20720641c9fc5501f7a33103ab256f9f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -100,6 +100,8 @@ Version 1.5.1 -- CVS
   - Fixed $custom_css loading in squirrelspell plugin.
   - Turkish translation uses C character case conversion rules. Fixes php and
     squirrelmail functions are assume English conversion rules.
+  - Fixed problem that caused an error when deleting all messages on the last page
+    of a paginated view (provides fix for #1014612)
 
 Version 1.5.0
 --------------------
index 08a513130b575747409682f59df4bd28e5bb6817..46ab1fb4efcc753df3b6401e800434a5b19d60fb 100644 (file)
@@ -1961,9 +1961,10 @@ function handleMessageListForm($imapConnection,&$aMailbox,$sButton='',$aUid = ar
                     $aMailbox['EXISTS'] -= (int) $iExpungedMessages;
                 }
                 // Change the startMessage number if the mailbox was changed
-                if (($aMailbox['PAGEOFFSET']+$iExpungedMessages-1) >= $aMailbox['EXISTS']) {
+                if (($aMailbox['PAGEOFFSET']-1) >= $aMailbox['EXISTS']) {
                     $aMailbox['PAGEOFFSET'] = ($aMailbox['PAGEOFFSET'] > $aMailbox['LIMIT']) ?
                         $aMailbox['PAGEOFFSET'] - $aMailbox['LIMIT'] : 1;
+                    $aMailbox['OFFSET'] = $aMailbox['PAGEOFFSET'] - 1 ; 
                 }
             }
         }