From: Jimmy C. <ci...@us...> - 2004-09-08 03:29:00
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18911/functions Modified Files: mailbox_display.php Log Message: 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. Index: mailbox_display.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/mailbox_display.php,v retrieving revision 1.413 retrieving revision 1.414 diff -u -w -r1.413 -r1.414 --- mailbox_display.php 24 Aug 2004 00:40:28 -0000 1.413 +++ mailbox_display.php 8 Sep 2004 03:28:33 -0000 1.414 @@ -1961,9 +1961,10 @@ $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 ; } } } |