- Small improvement. Patch by Moshe.

4.2.x
Dries Buytaert 2002-12-21 19:10:47 +00:00
parent c10ce14d1e
commit 8f673be382
1 changed files with 3 additions and 5 deletions

View File

@ -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);
}
}