X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fimap_search.php;h=a9cda0660a1fc32bf1920dac85f614a88db5a80b;hb=2df6ca53f811434d052179c620da81a8a5246d2f;hp=c8d9777b0f4915bec7152c4f687f78ad04735bb8;hpb=70b455e099c8358d52328d1de6b3c3bb5bda8d1b;p=squirrelmail.git diff --git a/functions/imap_search.php b/functions/imap_search.php index c8d9777b..a9cda066 100644 --- a/functions/imap_search.php +++ b/functions/imap_search.php @@ -1,6 +1,7 @@ -
No Messages Found
"; return; - } else { + } else if (isset($errors)) { echo ""; } # HACKED CODED FROM ANOTHER FUNCTION, Could Probably dump this and mondify # exsitising code with a search true/false varible. + global $sent_folder; for ($q = 0; $q < count($messagelist); $q++) { $messagelist[$q] = trim($messagelist[$q]); @@ -62,14 +66,15 @@ function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$colo else $hdr = sqimap_get_small_header ($imapConnection, $messagelist[$q], false); - $from[$q] = $hdr->from; - $date[$q] = $hdr->date; - $subject[$q] = $hdr->subject; + $from[$q] = $hdr->from; + $date[$q] = $hdr->date; + $subject[$q] = $hdr->subject; $to[$q] = $hdr->to; $priority[$q] = $hdr->priority; $cc[$q] = $hdr->cc; + $size[$q] = $hdr->size; + $type[$q] = $hdr->type0; $id[$q] = $messagelist[$q]; - $flags[$q] = sqimap_get_flags ($imapConnection, $messagelist[$q]); } @@ -86,8 +91,10 @@ function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$colo $messages[$j]["SUBJECT"] = decodeHeader($subject[$j]); $messages[$j]["SUBJECT-SORT"] = strtolower(decodeHeader($subject[$j])); $messages[$j]["TO"] = decodeHeader($to[$j]); - $messages[$j]["PRIORITY"] = $priority[$j]; + $messages[$j]["PRIORITY"] = $priority[$j]; $messages[$j]["CC"] = $cc[$j]; + $messages[$j]["SIZE"] = $size[$j]; + $messages[$j]["TYPE0"] = $type[$j]; $num = 0; while ($num < count($flags[$j])) { @@ -112,7 +119,7 @@ function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$colo $i = 0; $j = 0; while ($j < count($messagelist)) { - if ($messages[$j]["FLAG_DELETED"] == true) { + if (isset($messages[$j]["FLAG_DELETED"]) && $messages[$j]["FLAG_DELETED"] == true) { $j++; continue; } @@ -127,52 +134,12 @@ function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$colo if (count($messagelist) > 0) { $j=0; - echo "
" . _("Found") . " " . count($messagelist) . " " . _("messages") . "
\n"; - echo "
\n"; - echo ""; - echo ""; - echo "
"; - - echo "\n\n\n
"; - echo "\n"; - echo " \n"; - echo " \n"; - echo " "; - echo " \n"; - echo "
\n"; - echo " ". _("Move selected to:") .""; - echo " "; - echo " \n"; - - echo " \n"; - echo "  ". _("checked messages") ."\n"; - echo "
\n"; - do_hook("mailbox_form_before"); - echo "
"; - echo ""; - echo ""; - echo " "; - /** FROM HEADER **/ - if ($mailbox == $sent_folder) - echo " "; - else - echo " "; - /** DATE HEADER **/ - echo " "; - echo " \n"; - /** SUBJECT HEADER **/ - echo " \n"; - echo ""; + if (!isset ($msg)) { $msg = ""; } + mail_message_listing_beginning($imapConnection, + "move_messages.php?msg=$msg&mailbox=$urlMailbox&where=".urlencode($search_where)."&what=".urlencode($search_what), + '', -1, '' . _("Found") . ' ' . count($messagelist) . ' ' . _("messages") . '', + ' '); + while ($j < count($msgs)) { printMessageInfo($imapConnection, $msgs[$j]["ID"], 0, $j, $mailbox, "", 0, $search_where, $search_what);
 ". _("To") ."". _("From") ."". _("Date") ." ". _("Subject") ."