Commit 886ae2bf authored by Dries's avatar Dries

- Fixed some "search related" bugs introduced by Moshe's latest patch.
  Fixes bug #2127.
parent 74d9266b
......@@ -339,7 +339,7 @@ function search_item($item, $type) {
* @param $options != 0: Render additional form fields/text
* ("Restrict search to", help text, etc).
*/
function search_form($action = 0, $keys = 0, $options = 0) {
function search_form($action = NULL, $keys = NULL, $options = NULL) {
if (!$action) {
$action = url("search");
......@@ -400,11 +400,9 @@ function search_data($keys = NULL) {
* @param $options != 0: Render additional form fields/text
* ("Restrict search to", help text, etc).
*/
function search_type($type = 0, $action = 0, $keys = 0, $options = 0) {
function search_type($type, $action = NULL, $keys = NULL, $options = NULL) {
if (isset($type)) {
$_POST["edit"]["type"][$type] = "on";
}
$_POST["edit"]["type"][$type] = "on";
return search_form($action, $keys, $options) . "<br />". search_data($keys);
}
......
......@@ -1066,7 +1066,7 @@ function comment_admin() {
print comment_admin_edit(arg(3));
break;
case "search":
print search_type("comment", url("admin/comment/search"));
print search_type("comment", url("admin/comment/search"), $_POST["keys"]);
break;
case "votes":
case t("Add new vote"):
......
......@@ -1066,7 +1066,7 @@ function comment_admin() {
print comment_admin_edit(arg(3));
break;
case "search":
print search_type("comment", url("admin/comment/search"));
print search_type("comment", url("admin/comment/search"), $_POST["keys"]);
break;
case "votes":
case t("Add new vote"):
......
......@@ -797,7 +797,7 @@ function node_admin() {
*/
switch ($op) {
case "search":
print search_type("node", url("admin/node/search"));
print search_type("node", url("admin/node/search"), $_POST["keys"]);
break;
case "edit":
print node_admin_edit(arg(3));
......
......@@ -797,7 +797,7 @@ function node_admin() {
*/
switch ($op) {
case "search":
print search_type("node", url("admin/node/search"));
print search_type("node", url("admin/node/search"), $_POST["keys"]);
break;
case "edit":
print node_admin_edit(arg(3));
......
......@@ -1635,7 +1635,7 @@ function user_admin() {
switch ($op) {
case "search":
print search_type("user", url("admin/user/search"));
print search_type("user", url("admin/user/search"), $_POST["keys"]);
break;
case t("Add rule"):
case t("Check"):
......
......@@ -1635,7 +1635,7 @@ function user_admin() {
switch ($op) {
case "search":
print search_type("user", url("admin/user/search"));
print search_type("user", url("admin/user/search"), $_POST["keys"]);
break;
case t("Add rule"):
case t("Check"):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment