simplify search dialog

This commit is contained in:
Andrew Dolgov 2012-11-01 20:14:22 +04:00
parent 89faa1df1a
commit a8c1802512
2 changed files with 4 additions and 26 deletions

View File

@ -375,27 +375,9 @@ class Dlg extends Handler_Protected {
print "<div class=\"dlgSecCont\">"; print "<div class=\"dlgSecCont\">";
if (!SPHINX_ENABLED) {
print "<input dojoType=\"dijit.form.ValidationTextBox\"
style=\"font-size : 16px; width : 12em;\"
required=\"1\" name=\"query\" type=\"search\" value=''>";
print " " . __('match on')." ";
$search_fields = array(
"title" => __("Title"),
"content" => __("Content"),
"both" => __("Title or content"));
print_select_hash("match_on", 3, $search_fields,
'dojoType="dijit.form.Select"');
} else {
print "<input dojoType=\"dijit.form.ValidationTextBox\" print "<input dojoType=\"dijit.form.ValidationTextBox\"
style=\"font-size : 16px; width : 20em;\" style=\"font-size : 16px; width : 20em;\"
required=\"1\" name=\"query\" type=\"search\" value=''>"; required=\"1\" name=\"query\" type=\"search\" value=''>";
}
print "<hr/>".__('Limit search to:')." "; print "<hr/>".__('Limit search to:')." ";

View File

@ -215,11 +215,7 @@ class Feeds extends Handler_Protected {
} }
@$search_mode = db_escape_string($_REQUEST["search_mode"]); @$search_mode = db_escape_string($_REQUEST["search_mode"]);
@$match_on = db_escape_string($_REQUEST["match_on"]); $match_on = "both"; // deprecated, TODO: remove
if (!$match_on) {
$match_on = "both";
}
if ($_REQUEST["debug"]) $timing_info = print_checkpoint("H0", $timing_info); if ($_REQUEST["debug"]) $timing_info = print_checkpoint("H0", $timing_info);