X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsearch.php;h=de5471bbd36a76433970d2d3accd0b1fe4f0e6c2;hb=907aba419237fba0317f7abb2f27bb224592a5b7;hp=18ba2e519a3a317b8c83551ddb7c7442885faec9;hpb=1809bad8f78a708bd2df0c535a29b94ae21a24d1;p=squirrelmail.git diff --git a/src/search.php b/src/search.php index 18ba2e51..de5471bb 100644 --- a/src/search.php +++ b/src/search.php @@ -1,76 +1,71 @@ - - -
-
"._("Search")."
-
"; + do_hook('search_before_form'); + echo "
\n"; + echo " \n"; + echo " \n"; + echo '
\n"; + echo "
"._("Search")."
\n"; + echo "
'; - echo "
\n"; + echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " "; + 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 ' '; echo " \n"; @@ -81,10 +76,12 @@ 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"; - echo " \n"; - echo " \n"; - echo " '; + + if (isset($where) && $where == 'BODY') echo '
\n"; echo "
"; echo "
"; - if ($where && $what) { + do_hook("search_after_form"); + if (isset($where) && $where && isset($what) && $what) { sqimap_mailbox_select($imapConnection, $mailbox); sqimap_search($imapConnection, $where, $what, $mailbox, $color); } + do_hook("search_bottom"); sqimap_logout ($imapConnection); ?>