summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2003-09-14 08:57:55 +0000
committerDries Buytaert2003-09-14 08:57:55 +0000
commit0919670ff1de13a0f3663dc54b55ab5531445956 (patch)
tree1378b200631664f329b545533a7fc785c3fc3c26
parent3fe1e9091a586a31d186dec5d69ee6934bbdfaa8 (diff)
- Bugfix: fixed string being check_query()-ed twice. Bug #2425. Patch by
Matt.
-rw-r--r--includes/common.inc2
-rw-r--r--modules/user.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 7373c32..795ac39 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -373,7 +373,7 @@ function search_data($keys = NULL) {
if (isset($keys)) {
foreach (module_list() as $name) {
- if (module_hook($name, "search") && (!$edit["type"] || $edit["type"][$name]) && ($result = module_invoke($name, "search", check_query($keys)))) {
+ if (module_hook($name, "search") && (!$edit["type"] || $edit["type"][$name]) && ($result = module_invoke($name, "search", $keys))) {
if ($name == "node" || $name == "comment") {
$output .= "<p><b>". t("Matching ". $name ."s ranked in order of relevance") .":</b></p>";
}
diff --git a/modules/user.module b/modules/user.module
index 040725c..359a10e 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -318,7 +318,7 @@ function user_perm() {
function user_search($keys) {
- $result = db_query_range("SELECT * FROM users WHERE name LIKE '%$keys%'", 0, 20);
+ $result = db_query_range("SELECT * FROM users WHERE name LIKE '%". check_query($keys) ."%'", 0, 20);
while ($account = db_fetch_object($result)) {
$find[$i++] = array("title" => $account->name, "link" => (strstr(request_uri(), "admin") ? url("admin/user/edit/$account->uid") : url("user/view/$account->uid")), "user" => $account->name);
}