summaryrefslogtreecommitdiff
path: root/includes/search.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/search.inc')
-rw-r--r--includes/search.inc8
1 files changed, 3 insertions, 5 deletions
diff --git a/includes/search.inc b/includes/search.inc
index 99ed78d74..af2139e84 100644
--- a/includes/search.inc
+++ b/includes/search.inc
@@ -4,14 +4,13 @@ function search_form($keys) {
global $REQUEST_URI;
$output .= "<FORM ACTION=\"$REQUEST_URI\" METHOD=\"POST\">\n";
$output .= " <INPUT SIZE=\"50\" VALUE=\"". check_textfield($keys) ."\" NAME=\"keys\">";
- $output .= " <INPUT TYPE=\"submit\" VALUE=\"Search\">\n";
+ $output .= " <INPUT TYPE=\"submit\" VALUE=\"". t("Search") ."\">\n";
$output .= "</FORM>\n";
return $output;
}
function search_data($keys, $type) {
- if ($keys && $type) {
- $result = module_invoke($type, "find", check_input($keys));
+ if ($keys && $type && $result = module_invoke($type, "search", check_input($keys))) {
foreach ($result as $entry) {
$output .= "<P>\n";
$output .= " <B><U><A HREF=\"$entry[link]\">$entry[title]</A></U></B><BR>";
@@ -19,8 +18,7 @@ function search_data($keys, $type) {
$output .= "</P>\n";
}
}
-
- if (!$output) {
+ else {
$output .= t("Your search yielded no results.");
}