adding listing controls to file backend
[squirrelmail.git] / src / search.php
index e37c467ba858d6c280de692ac87976eb97ec311e..934ff4913c592a52bfc1b682f8293c8bb1f3cf4e 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * search.php
  *
- * Copyright (c) 1999-2004 The SquirrelMail Project Team
+ * Copyright (c) 1999-2005 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * IMAP search page
@@ -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]);
@@ -921,7 +921,7 @@ function asearch_print_mailbox_msgs($imapConnection, &$aMailbox, $color) {
     mail_message_listing_end($cnt, '', $msg_cnt_str);
     echo '</td></tr>';
 
-    echo '</table>';
+    echo '</table></form>';
 }
 
 /**