fix + make use of more modular mailbox_display
[squirrelmail.git] / functions / imap_search.php
index 1a2d9008f40940d6bc6742ef659e375be8fd8da7..3c253584a54e51270e2f613395b4f1c80add7189 100644 (file)
@@ -78,10 +78,7 @@ function sqimap_search($imapConnection, $search_where, $search_what, $mailbox,
     /* If nothing is found * SEARCH should be the first error else echo errors */
     if (isset($errors)) {
         if (strstr($errors,'* SEARCH')) {
-            if ($search_all != 'all') {
-                echo '<br><CENTER>' . _("No Messages Found") . '</CENTER>';
-            }
-            return;
+            return array();
         }
         echo "<!-- $errors -->";
     }
@@ -95,7 +92,7 @@ function sqimap_search($imapConnection, $search_where, $search_what, $mailbox,
     }
     $issent = ($mailbox == $sent_folder);
 
-    $msgs = fillMessageArray($imapConnection,$id,$issent,$cnt);
+    $msgs = fillMessageArray($imapConnection,$id,$cnt);
 
     return $msgs;
 }