Fix for Forward messages from a search
[squirrelmail.git] / src / search.php
index 27fe5ca7590fd58d2924f4da7c6e18c99f43ba74..8ace7760cb04d2182659311e9745bfa33d35e1db 100644 (file)
@@ -180,8 +180,11 @@ if ($mailbox == 'All Folders') {
     $search_all = 'all';
 }
 
-displayPageHeader($color, $mailbox);
-
+if (isset($composenew) && $composenew) {
+    displayPageHeader($color, $mailbox, 'comp_in_new();');
+} else {
+    displayPageHeader($color, $mailbox);
+}
 /*  See how the page was called and fire off correct function  */
 if ((!isset($submit) || empty($submit)) && !empty($what)) {
     $submit = _("Search");
@@ -368,9 +371,9 @@ do_hook('search_after_form');
 */
 
 $old_value = 0;
-if ($allow_thread_sort == true) {
+if ($allow_thread_sort == TRUE) {
     $old_value = $allow_thread_sort;
-    $allow_thread_sort = false;
+    $allow_thread_sort = FALSE;
 }
 
 if ($search_all == 'all') {
@@ -391,11 +394,11 @@ if ($search_all == 'all') {
     }
     for ($i=0;$i<count($perbox_count);$i++) {
         if ($perbox_count[$i] != "") {
-           break;
+            $count_all = "found";
+            break;
         }
-        $count_all = "none";
     }
-    if ($count_all == "none") {
+    if ($count_all != "found") {
         echo '<br><b>' .
              _("No Messages found") .
              '</b><br>';