X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsearch.php;h=de5471bbd36a76433970d2d3accd0b1fe4f0e6c2;hb=907aba419237fba0317f7abb2f27bb224592a5b7;hp=ed92be5e85d7a2173d7d65f9e43b07483764882e;hpb=441f2d33bad826a0278aafe63e58d0b3c81b6e0c;p=squirrelmail.git diff --git a/src/search.php b/src/search.php index ed92be5e..de5471bb 100644 --- a/src/search.php +++ b/src/search.php @@ -1,91 +1,71 @@ \n"; echo " \n"; echo " \n"; - echo "
\n"; echo "
"._("Search")."
\n"; echo "
"; + echo '
'; echo "
\n"; echo " \n"; echo " \n"; echo " \n"; echo " "; + echo ' '; echo " \n"; @@ -97,10 +77,9 @@ echo ""; echo "
\n"; - echo " '; $boxes = sqimap_mailbox_list($imapConnection); for ($i = 0; $i < count($boxes); $i++) { - if ($boxes[$i]["flags"][0] != "noselect" && $boxes[$i]["flags"][1] != "noselect" && $boxes[$i]["flags"][2] != "noselect") { - $box = $boxes[$i]["unformatted"]; - $box2 = replace_spaces($boxes[$i]["formatted"]); + if (!in_array('noselect', $boxes[$i]['flags'])) { + $box = $boxes[$i]['unformatted']; + $box2 = str_replace(' ', ' ', $boxes[$i]['unformatted-disp']); if ($mailbox == $box) echo " "; + echo ' '; echo " \n"; - $what_disp = ereg_replace(",", " ", $what); - $what_disp = str_replace("\\\\", "\\", $what_disp); - $what_disp = str_replace("\\\"", "\"", $what_disp); - $what_disp = str_replace("\"", """, $what_disp); + if (!isset($what)) + $what = ''; + $what_disp = ereg_replace(',', ' ', $what); + $what_disp = str_replace('\\\\', '\\', $what_disp); + $what_disp = str_replace('\\"', '"', $what_disp); + $what_disp = str_replace('"', '"', $what_disp); echo " \n"; - echo " \n"; - echo " '; - if ($where == "BODY") echo "
"; do_hook("search_after_form"); - if ($where && $what) { + if (isset($where) && $where && isset($what) && $what) { sqimap_mailbox_select($imapConnection, $mailbox); sqimap_search($imapConnection, $where, $what, $mailbox, $color); - sqimap_mailbox_close($imapConnection); } do_hook("search_bottom"); sqimap_logout ($imapConnection);