OSDN Git Service

BaseActions::initialize()をコンストラクタに変更。合わせてinitialize()を呼び出している継承クラスのコンストラクタからparent...
authorreine <reine@users.sourceforge.jp>
Tue, 17 Apr 2012 11:52:22 +0000 (20:52 +0900)
committerreine <reine@users.sourceforge.jp>
Tue, 17 Apr 2012 11:52:22 +0000 (20:52 +0900)
nucleus/libs/ACTIONS.php
nucleus/libs/BODYACTIONS.php
nucleus/libs/BaseActions.php
nucleus/libs/COMMENTACTIONS.php
nucleus/libs/ITEMACTIONS.php
nucleus/libs/PAGEFACTORY.php

index 4a86b41..4d9f440 100644 (file)
@@ -258,10 +258,11 @@ class Actions extends BaseActions
         */
        public function __construct($type)
        {
+               // call constructor of superclass first
+               parent::__construct();
+               
                global $catid;
                
-               // call constructor of superclass first
-               $this->initialize();
                $this->skintype = $type;
                
                if ( $catid )
index b04639c..6a5230f 100644 (file)
@@ -45,7 +45,7 @@ class BodyActions extends BaseActions
         */
        public function __construct()
        {
-               $this->initialize();    
+               parent::__construct();  
                return;
        }
        
index 8346046..10c1b51 100644 (file)
@@ -53,10 +53,10 @@ class BaseActions
        private $aHighlight;
        
        /**
-        * BaseActions::BaseActions()
+        * BaseActions::__construct()
         *  Constructor for a new BaseAction object
         */
-       protected function initialize()
+       protected function __construct()
        {
                $this->level = 0;
                
index 9354deb..65ca1e8 100644 (file)
@@ -91,7 +91,7 @@ class CommentActions extends BaseActions
        public function __construct(&$comments)
        {
                // call constructor of superclass first
-               $this->initialize();
+               parent::__construct();
                
                // reference to the comments object
                $this->setCommentsObj($comments);
index 58ab008..8059aaf 100644 (file)
@@ -122,10 +122,10 @@ class ItemActions extends BaseActions
         */
        public function __construct(&$blog)
        {
-               global $catid, $member;
                // call constructor of superclass first
-               $this->initialize();
+               parent::__construct();
                
+               global $catid, $member;
                // extra parameters for created links
                if ( $catid )
                {
index a716f89..2657143 100644 (file)
@@ -98,9 +98,9 @@ class PageFactory extends BaseActions
         */
        public function __construct($blog_id)
        {
-               global $manager;
+               parent::__construct();
                
-               parent::initialize();
+               global $manager;
                
                $this->blog =& $manager->getBlog($blog_id);