diff --git a/modules/pref-filters.php b/modules/pref-filters.php index 18c78da6c..ac71c96a2 100644 --- a/modules/pref-filters.php +++ b/modules/pref-filters.php @@ -219,8 +219,23 @@ $filter_types[$line["id"]] = $line["description"]; } - print " - "; + + $filter_search = db_escape_string($_GET["search"]); + + if (array_key_exists("search", $_GET)) { + $_SESSION["prefs_filter_search"] = $filter_search; + } else { + $filter_search = $_SESSION["prefs_filter_search"]; + } + + print "
".__('No filters defined.')."
"; + print ""; + + if (!$filter_search) { + print __('No filters defined.'); + } else { + print __('No matching filters found.'); + } + + print "
"; } } diff --git a/prefs.js b/prefs.js index 78ec548a9..b207ba2d5 100644 --- a/prefs.js +++ b/prefs.js @@ -1228,8 +1228,13 @@ function updateFilterList(sort_key) { return } + var filter_search = document.getElementById("filter_search"); + var search = ""; + if (filter_search) { search = filter_search.value; } + xmlhttp.open("GET", "backend.php?op=pref-filters&sort=" + - param_escape(sort_key), true); + param_escape(sort_key) + + "&search=" + param_escape(search), true); xmlhttp.onreadystatechange=filterlist_callback; xmlhttp.send(null);