Commit 8f673be3 authored by Dries's avatar Dries

- Small improvement.  Patch by Moshe.
parent c10ce14d
......@@ -30,11 +30,9 @@ function module_invoke($name, $hook, $a1 = NULL, $a2 = NULL, $a3 = NULL, $a4 = N
function module_invoke_all($hook, $a1 = NULL, $a2 = NULL, $a3 = NULL, $a4 = NULL) {
$return = array();
foreach (module_list() as $name) {
if (module_hook($name, $hook)) {
$result = module_invoke($name, $hook, $a1, $a2, $a3, $a4);
if (isset($result)) {
$return = array_merge($return, $result);
}
$result = module_invoke($name, $hook, $a1, $a2, $a3, $a4);
if (isset($result)) {
$return = array_merge($return, $result);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment