Use the count of what we found, not what is in the actual mailbox
authorindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 3 Dec 2004 18:22:57 +0000 (18:22 +0000)
committerindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 3 Dec 2004 18:22:57 +0000 (18:22 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8407 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/search.php

index e37c467ba858d6c280de692ac87976eb97ec311e..7d276868a57410750c5c339e1be404d3e2e15222 100644 (file)
@@ -878,8 +878,8 @@ function asearch_print_mailbox_msgs($imapConnection, &$aMailbox, $color) {
     $cnt = count($aMailbox['UIDSET'][$iSetIndx]);
 
     $iLimit = ($aMailbox['SHOWALL'][$iSetIndx]) ? $cnt : $aMailbox['LIMIT'];
-    $iEnd = ($aMailbox['PAGEOFFSET'] + ($iLimit - 1) < $aMailbox['EXISTS']) ?
-            $aMailbox['PAGEOFFSET'] + $iLimit - 1 : $cnt;
+    $iEnd = ($aMailbox['PAGEOFFSET'] + ($iLimit - 1) < $cnt) ?
+            $aMailbox['PAGEOFFSET'] + ($iLimit - 1) : $cnt;
 
     $paginator_str = get_paginator_str($aMailbox['NAME'], $aMailbox['PAGEOFFSET'],
                                     $cnt, $aMailbox['LIMIT'], $aMailbox['SHOWALL'][$iSetIndx]);
@@ -1493,4 +1493,4 @@ do_hook('search_bottom');
 sqimap_logout($imapConnection);
 echo '</body></html>';
 sqsession_register($mailbox_cache,'mailbox_cache');
-?>
\ No newline at end of file
+?>