OSDN Git Service

MERGE: リビジョン1894〜1990
[nucleus-jp/nucleus-next.git] / nucleus / libs / BLOG.php
index 638329f..64ea623 100644 (file)
@@ -184,7 +184,6 @@ class Blog
        private function showUsingQuery($templateName, $query, $highlight = '', $comments = 0, $dateheads = 1)
        {
                global $CONF, $manager, $currentTemplateName;
-               global $StartTime;
                
                $lastVisit = cookieVar($CONF['CookiePrefix'] .'lastVisit');
                if ( $lastVisit != 0 )
@@ -229,7 +228,7 @@ class Blog
                                        if ( $old_date != 0 )
                                        {
                                                $oldTS = strtotime($old_date);
-                                               $data = array('blog' => $this, 'timestamp' => $oldTS);
+                                               $data = array('blog' => &$this, 'timestamp' => $oldTS);
                                                $manager->notify('PreDateFoot', $data);
                                                
                                                if ( !in_array('DATE_FOOTER', $template) || empty($template['DATE_FOOTER']) )
@@ -244,7 +243,7 @@ class Blog
                                                $manager->notify('PostDateFoot', $data);
                                        }
                                        
-                                       $data = array('blog' => $this, 'timestamp' => $timestamp);
+                                       $data = array('blog' => &$this, 'timestamp' => $timestamp);
                                        $manager->notify('PreDateHead', $data);
                                        
                                        // note, to use templatvars in the dateheader, the %-characters need to be doubled in
@@ -265,7 +264,7 @@ class Blog
                        
                        // parse item
                        $parser->parse($template['ITEM_HEADER']);
-                       $data = array('blog' => $this, 'item' => &$item);
+                       $data = array('blog' => &$this, 'item' => &$item);
                        $manager->notify('PreItem', $data);
                        $parser->parse($template['ITEM']);
                        $manager->notify('PostItem', $data);
@@ -277,7 +276,7 @@ class Blog
                // add another date footer if there was at least one item
                if ( ($numrows > 0) && $dateheads )
                {
-                       $data = array('blog' => $this, 'timestamp' => strtotime($old_date));
+                       $data = array('blog' => &$this, 'timestamp' => strtotime($old_date));
                        $manager->notify('PreDateFoot', $data);
                        $parser->parse($template['DATE_FOOTER']);
                        $manager->notify('PostDateFoot', $data);
@@ -942,7 +941,7 @@ class Blog
         * @param       string  $direction      ASC/DESC
         * @return      void
         */
-       public function showBlogList($template, $bnametype, $orderby, $direction)
+       static public function showBlogList($template, $bnametype, $orderby, $direction)
        {
                global $CONF, $manager;