X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=nucleus%2Flibs%2FMANAGER.php;h=fa6686bf4e8c27412221f56fdecc722aed06d2e1;hb=4bd96c97fb168bc77b722f229f0bb4d24f44915e;hp=c898977cfdbf4f3a9a92c19f796baed1d70d3fcd;hpb=a6716c8fc52628d1d6ce5ca6f66a8bf87c0cf2e8;p=nucleus-jp%2Fnucleus-jp-ancient.git diff --git a/nucleus/libs/MANAGER.php b/nucleus/libs/MANAGER.php index c898977..fa6686b 100755 --- a/nucleus/libs/MANAGER.php +++ b/nucleus/libs/MANAGER.php @@ -66,7 +66,7 @@ class MANAGER { function &instance() { static $instance = array(); if (empty($instance)) { - $instance[0] =& new MANAGER(); + $instance[0] = new MANAGER(); } return $instance[0]; } @@ -142,7 +142,7 @@ class MANAGER { // load class if needed $this->_loadClass('BLOG','BLOG.php'); // load blog object - $blog =& new BLOG($blogid); + $blog = new BLOG($blogid); $this->blogs[$blogid] =& $blog; } return $blog; @@ -187,7 +187,7 @@ class MANAGER { // load class if needed $this->_loadClass('KARMA','KARMA.php'); // create KARMA object - $karma =& new KARMA($itemid); + $karma = new KARMA($itemid); $this->karma[$itemid] =& $karma; } return $karma; @@ -269,7 +269,7 @@ class MANAGER { } // add to plugin array - eval('$this->plugins[$name] =& new ' . $name . '();'); + eval('$this->plugins[$name] = new ' . $name . '();'); // get plugid $this->plugins[$name]->plugid = $this->getPidFromName($name); @@ -407,7 +407,7 @@ class MANAGER { * Can contain any type of data, depending on the event type. Usually this is * an itemid, blogid, ... but it can also be an array containing multiple values */ - function notify($eventName, $data) { + function notify($eventName, &$data) { // load subscription list if needed if (!is_array($this->subscriptions)) $this->_loadSubscriptions(); @@ -426,7 +426,7 @@ class MANAGER { $this->_loadPlugin($listener); // do notify (if method exists) if (isset($this->plugins[$listener]) && method_exists($this->plugins[$listener], 'event_' . $eventName)) - call_user_func(array(&$this->plugins[$listener],'event_' . $eventName), &$data); + call_user_func(array($this->plugins[$listener], 'event_' . $eventName), $data); } }