Fix a small bug when displaying less messages than the page max.
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 19 Apr 2005 19:23:35 +0000 (19:23 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 19 Apr 2005 19:23:35 +0000 (19:23 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9361 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mailbox_display.php

index adf6b5efb25687ebc9aadaad88fb228b3058c049..4a58d6dacaa9177d04751a746bc960d5029741bf 100644 (file)
@@ -899,6 +899,7 @@ function showMessagesForMailbox($imapConnection, &$aMailbox,$aProps, &$iError) {
              $aMailbox['PAGEOFFSET'] + $iLimit - 1 : $aMailbox['EXISTS'];
 
     $iNumberOfMessages = $aMailbox['TOTAL'][$iSetIndx];
+    $iEnd = min ( $iEnd, $iNumberOfMessages );
 
     $php_self = $PHP_SELF;
 
@@ -1377,4 +1378,4 @@ function attachSelectedMessages($imapConnection,$aMsgHeaders) {
     return $composesession;
 }
 
-?>
\ No newline at end of file
+?>