diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-02-01 19:07:36 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-02-01 19:07:36 +0000 |
commit | 928435a565a58facca9c01d1fc186b5e3cfc0a2c (patch) | |
tree | c3cac77be9c0e006782fce44aab530c1c91510ed | |
parent | 4cef0f12c8933ba881c12666f18dfeeacf002266 (diff) | |
download | brdo-928435a565a58facca9c01d1fc186b5e3cfc0a2c.tar.gz brdo-928435a565a58facca9c01d1fc186b5e3cfc0a2c.tar.bz2 |
- Fixed bug 5532: search broken if any subsearch returns without results.
Patch by Goba.
-rw-r--r-- | includes/common.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/includes/common.inc b/includes/common.inc index ab5317276..3afdf3cfd 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -663,10 +663,13 @@ 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))) { - $output .= "<h2>$result[0]</h2>"; - foreach ($result[1] as $entry) { - $output .= search_item($entry, $name); + if (module_hook($name, "search") && (!$edit["type"] || $edit["type"][$name])) { + list($title, $results) = module_invoke($name, "search", $keys); + if ($results) { + $output .= "<h2>$title</h2>"; + foreach ($results as $entry) { + $output .= search_item($entry, $name); + } } } } |