From 66190b17877a09be27f8c641bf267b334f9bbdae Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 26 Jan 2004 19:22:22 +0000 Subject: - Patch #5393 by Goba: changes the search hook return value, and requires an array containing two elements, the first being the requested title, and the second being the result list. Advantages: * Cleaner search code in common.inc * Po extraction is possible and works fine * No hardcoded exceptions for node and comment modules, since any module can return results in order of relevance (or another order) --- modules/comment.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/comment.module') diff --git a/modules/comment.module b/modules/comment.module index 7bd5b5240..4e78e7677 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() { -- cgit v1.2.3