diff --git a/includes/common.inc b/includes/common.inc
index e7a7ef02629..8d6cdcc4123 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -664,13 +664,8 @@ 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", $keys))) {
- if ($name == "node" || $name == "comment") {
- $output .= "
". t("Matching %names ranked in order of relevance:", array("%name" => $name)) ."
";
- }
- else {
- $output .= "". t("Matching {$name}s") .":
";
- }
- foreach ($result as $entry) {
+ $output .= "$result[0]
";
+ foreach ($result[1] as $entry) {
$output .= search_item($entry, $name);
}
}
diff --git a/modules/comment.module b/modules/comment.module
index 7bd5b5240d2..4e78e7677b6 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -1622,7 +1622,7 @@ function comment_search($keys) {
$find = do_search(array("keys" => $keys, "type" => "comment", "select" => "select s.lno as lno, c.nid as nid, c.subject as title, c.timestamp as created, u.uid as uid, u.name as name, s.count as count FROM {search_index} s, {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE s.lno = c.cid AND s.type = 'comment' AND c.status = 0 AND s.word like '%'"));
- return $find;
+ return array(t("Matching comments ranked in order of relevance"), $find);
}
function comment_update_index() {
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 7bd5b5240d2..4e78e7677b6 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1622,7 +1622,7 @@ function comment_search($keys) {
$find = do_search(array("keys" => $keys, "type" => "comment", "select" => "select s.lno as lno, c.nid as nid, c.subject as title, c.timestamp as created, u.uid as uid, u.name as name, s.count as count FROM {search_index} s, {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE s.lno = c.cid AND s.type = 'comment' AND c.status = 0 AND s.word like '%'"));
- return $find;
+ return array(t("Matching comments ranked in order of relevance"), $find);
}
function comment_update_index() {
diff --git a/modules/node.module b/modules/node.module
index 7b0bd1cb011..c902fd3b555 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -566,7 +566,7 @@ function node_search($keys) {
//
$find = do_search(array("keys" => $keys, "type" => "node", "select" => "select s.lno as lno, n.title as title, n.created as created, u.uid as uid, u.name as name, s.count as count FROM {search_index} s, {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE s.lno = n.nid AND s.type = 'node' AND s.word like '%' AND n.status = 1"));
- return $find;
+ return array(t("Matching nodes ranked in order of relevance"), $find);
}
function node_settings() {
diff --git a/modules/node/node.module b/modules/node/node.module
index 7b0bd1cb011..c902fd3b555 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -566,7 +566,7 @@ function node_search($keys) {
//
$find = do_search(array("keys" => $keys, "type" => "node", "select" => "select s.lno as lno, n.title as title, n.created as created, u.uid as uid, u.name as name, s.count as count FROM {search_index} s, {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE s.lno = n.nid AND s.type = 'node' AND s.word like '%' AND n.status = 1"));
- return $find;
+ return array(t("Matching nodes ranked in order of relevance"), $find);
}
function node_settings() {
diff --git a/modules/user.module b/modules/user.module
index 68c2b6eb743..79f490ad566 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -300,7 +300,7 @@ function user_search($keys) {
while ($account = db_fetch_object($result)) {
$find[] = array("title" => $account->name, "link" => (strstr(request_uri(), "admin") ? url("admin/user/edit/$account->uid") : url("user/view/$account->uid")), "user" => $account->name);
}
- return $find;
+ return array(t("Matching users"), $find);
}
function user_block($op = "list", $delta = 0) {
diff --git a/modules/user/user.module b/modules/user/user.module
index 68c2b6eb743..79f490ad566 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -300,7 +300,7 @@ function user_search($keys) {
while ($account = db_fetch_object($result)) {
$find[] = array("title" => $account->name, "link" => (strstr(request_uri(), "admin") ? url("admin/user/edit/$account->uid") : url("user/view/$account->uid")), "user" => $account->name);
}
- return $find;
+ return array(t("Matching users"), $find);
}
function user_block($op = "list", $delta = 0) {