From 4c284a740ba8e14d1b6391b2f755d76f9193c9d7 Mon Sep 17 00:00:00 2001 From: cigamit Date: Wed, 8 Sep 2004 03:28:33 +0000 Subject: [PATCH] Fixed problem that caused an error when deleting all messages on the last page of a paginated view (provides fix for #1014612). It would point to an invalid page mainly because an extra variable wasn't being updated and one other small miscalculation. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8041 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 2 ++ functions/mailbox_display.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 16437e11..456d85ad 100644 --- 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 -------------------- diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 08a51313..46ab1fb4 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -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 ; } } } -- 2.25.1