X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsearch.php;h=7eb98a183faa78e51be51356758c4bff51f4fb4d;hb=16a973d70a51ec3e3a171b87fcf0fc2fd5de5351;hp=fe169f8332dd6ae9d977276535513fc8d2e4af4d;hpb=74a7d5b094a071509ce4d1de399c91ca185c2cbf;p=squirrelmail.git diff --git a/src/search.php b/src/search.php index fe169f83..7eb98a18 100644 --- a/src/search.php +++ b/src/search.php @@ -1,19 +1,32 @@ ', + $color[8], $color[4], $color[7], $color[7], $color[7]); + plain_error_message(_("You need a valid user and password to access this page!") + . "
" + . _("Click here to log back in.") . ".", $color); + echo ""; exit; } - if (!isset($config_php)) - include("../config/config.php"); if (!isset($strings_php)) include("../functions/strings.php"); + if (!isset($i18n_php)) + include("../functions/i18n.php"); + if (!isset($config_php)) + include("../config/config.php"); if (!isset($page_header_php)) include("../functions/page_header.php"); if (!isset($imap_php)) @@ -44,7 +57,7 @@ $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") { + if (!in_array("noselect", $boxes[$i]["flags"])) { $box = $boxes[$i]["unformatted"]; $box2 = replace_spaces($boxes[$i]["formatted"]); if ($mailbox == $box) @@ -56,6 +69,8 @@ echo " "; echo " \n"; echo " \n"; + if (!isset($what)) + $what = ""; $what_disp = ereg_replace(",", " ", $what); $what_disp = str_replace("\\\\", "\\", $what_disp); $what_disp = str_replace("\\\"", "\"", $what_disp); @@ -65,22 +80,22 @@ echo " \n"; echo " \n"; @@ -93,7 +108,7 @@ echo ""; 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); }