Rollback some of the changes from r20822. But still pull the

determination of the function name and arguments to outside 
the module loop
This commit is contained in:
Tim Almdal
2009-05-17 04:37:00 +00:00
parent 17c58c8dce
commit 3baecc628f
+3 -3
View File
@@ -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) {