OSDN Git Service

FIX: デバッグ動作時に発生する警告に対処
[nucleus-jp/nucleus-jp-ancient.git] / nucleus / libs / MANAGER.php
index c898977..fa6686b 100755 (executable)
@@ -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);
             }
         }