OSDN Git Service

FIX:$manager->notify()の第二引数に変数を渡すように修正。
[nucleus-jp/nucleus-next.git] / nucleus / libs / ACTIONS.php
index 3ee541d..54c1b98 100644 (file)
@@ -706,10 +706,11 @@ class Actions extends BaseActions
         * @param       object  $blog   an instance of Blog class
         * @return      void
         */
-       private function preBlogContent($type, &$blog)
+       private function preBlogContent($type, $blog)
        {
                global $manager;
-               $manager->notify('PreBlogContent',array('blog' => &$blog, 'type' => $type));
+               $data = array('blog' => $blog, 'type' => $type);
+               $manager->notify('PreBlogContent', $data);
                return;
        }
 
@@ -721,10 +722,11 @@ class Actions extends BaseActions
         * @param       objecct $blog   an instance of Blog class
         * @return      void
         */
-       private function postBlogContent($type, &$blog)
+       private function postBlogContent($type, $blog)
        {
                global $manager;
-               $manager->notify('PostBlogContent', array('blog' => &$blog, 'type' => $type));
+               $data = array('blog' => $blog, 'type' => $type);
+               $manager->notify('PostBlogContent', $data);
                return;
        }
        
@@ -974,11 +976,11 @@ class Actions extends BaseActions
        public function parse_blog($template, $amount = 10, $category = '')
        {
                global $blog, $startpos;
-               
                list($limit, $offset) = sscanf($amount, '%d(%d)');
                $this->setBlogCategory($blog, $category);
                $this->preBlogContent('blog',$blog);
                $this->amountfound = $blog->readLog($template, $limit, $offset, $startpos);
+               $this->parse_benchmark();
                $this->postBlogContent('blog',$blog);
                return;
        }
@@ -1042,7 +1044,8 @@ class Actions extends BaseActions
        public function parse_callback($eventName, $type)
        {
                global $manager;
-               $manager->notify($eventName, array('type' => $type));
+               $data = array('type' => $type);
+               $manager->notify($eventName, $data);
                return;
        }