summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-05-17 04:37:00 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-05-17 04:37:00 +0000
commit3baecc628f488e4845bb4ce6b5e58ef0f389c3e3 (patch)
treee08f2a3def5545017ccda2d9acb7faba6ec34ad8
parent17c58c8dceb9dcc96acaaefacf2c6e0c00c06a31 (diff)
Rollback some of the changes from r20822. But still pull the
determination of the function name and arguments to outside the module loop
-rw-r--r--core/helpers/module.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/helpers/module.php b/core/helpers/module.php
index 7e483fb9..ca5af3fc 100644
--- a/core/helpers/module.php
+++ b/core/helpers/module.php
@@ -167,10 +167,10 @@ class module_Core {
* Run a specific event on all active modules.
* @param string $name the event name
* @param mixed $data data to pass to each event handler
- * @param mixed $data2 data to pass to each event handler
*/
- static function event($name, &$data=null, &$data2=null) {
- $args = empty($data2) ? array(&$data) : array(&$data, &$data2);
+ static function event($name, &$data=null) {
+ $args = func_get_args();
+ array_shift($args);
$function = str_replace(".", "_", $name);
foreach (self::installed() as $module) {