X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fimap_search.php;h=d628446146432564cfc9aad319900a42b296459c;hb=e9eca7fe297c8c9f87471791d607a2581cf5a807;hp=d765c65f31c627260a52e56d3d87ce3401988c94;hpb=6a109962730487f0fcd33d55280f7da00c6f02a8;p=squirrelmail.git diff --git a/functions/imap_search.php b/functions/imap_search.php index d765c65f..d6284461 100644 --- a/functions/imap_search.php +++ b/functions/imap_search.php @@ -1,19 +1,19 @@ -
No Messages Found
"; return; - } else { + } else if (isset($errors)) { echo ""; } @@ -63,20 +70,21 @@ 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]); } $j = 0; while ($j < count($messagelist)) { - $date[$j] = ereg_replace(" ", " ", $date[$j]); + $date[$j] = ereg_replace(' ', ' ', $date[$j]); $tmpdate = explode(" ", trim($date[$j])); $messages[$j]["TIME_STAMP"] = getTimeStamp($tmpdate); @@ -87,8 +95,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])) { @@ -113,7 +123,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; } @@ -128,6 +138,7 @@ function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$colo if (count($messagelist) > 0) { $j=0; + 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") . '',