diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2011-09-05 11:11:17 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2011-09-05 11:11:17 -0700 |
commit | a500758588ef93896408d430ea44c69f9c5f15f5 (patch) | |
tree | 1cb92d1bc040d0c30dc5be24c01de160156df288 | |
parent | 6b54665a5921d26d00559644754047420776da4a (diff) | |
download | brdo-a500758588ef93896408d430ea44c69f9c5f15f5.tar.gz brdo-a500758588ef93896408d430ea44c69f9c5f15f5.tar.bz2 |
Issue #1216758 by tim.plunkett: Add module and hook as formal parameters in module_invoke().
-rw-r--r-- | includes/module.inc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/includes/module.inc b/includes/module.inc index 779b66826..66c77f577 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -786,10 +786,9 @@ function module_implements_write_cache() { * @return * The return value of the hook implementation. */ -function module_invoke() { +function module_invoke($module, $hook) { $args = func_get_args(); - $module = $args[0]; - $hook = $args[1]; + // Remove $module and $hook from the arguments. unset($args[0], $args[1]); if (module_hook($module, $hook)) { return call_user_func_array($module . '_' . $hook, $args); @@ -808,9 +807,9 @@ function module_invoke() { * An array of return values of the hook implementations. If modules return * arrays from their implementations, those are merged into one array. */ -function module_invoke_all() { +function module_invoke_all($hook) { $args = func_get_args(); - $hook = $args[0]; + // Remove $hook from the arguments. unset($args[0]); $return = array(); foreach (module_implements($hook) as $module) { |