summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2003-06-30 19:18:47 +0000
committerDries Buytaert2003-06-30 19:18:47 +0000
commit886ae2bf158ef289766d8ea65966e6477423e03a (patch)
treed9535a634a04eacd9e60dfbb6674441f79ef6b72
parent74d9266b3f2e0480c8efe7b938d2d213ecca3f19 (diff)
- Fixed some "search related" bugs introduced by Moshe's latest patch.
Fixes bug #2127.
-rw-r--r--includes/common.inc8
-rw-r--r--modules/comment.module2
-rw-r--r--modules/comment/comment.module2
-rw-r--r--modules/node.module2
-rw-r--r--modules/node/node.module2
-rw-r--r--modules/user.module2
-rw-r--r--modules/user/user.module2
7 files changed, 9 insertions, 11 deletions
diff --git a/includes/common.inc b/includes/common.inc
index a602653..910174e 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -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);
}
diff --git a/modules/comment.module b/modules/comment.module
index d6f201e..f6d6518 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -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"):
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index d6f201e..f6d6518 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -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"):
diff --git a/modules/node.module b/modules/node.module
index ccdd264..3d1bc04 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -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));
diff --git a/modules/node/node.module b/modules/node/node.module
index ccdd264..3d1bc04 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -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));
diff --git a/modules/user.module b/modules/user.module
index fbba36e..4f3387e 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -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"):
diff --git a/modules/user/user.module b/modules/user/user.module
index fbba36e..4f3387e 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -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"):