OSDN Git Service

#17549 - Remove constructor with reference.
authormumin <mumincacao@users.sourceforge.jp>
Sun, 28 Jun 2009 13:27:01 +0000 (22:27 +0900)
committermumin <mumincacao@users.sourceforge.jp>
Sun, 28 Jun 2009 13:27:01 +0000 (22:27 +0900)
16 files changed:
trust_path/modules/sd2nd/actions/AbilityListAction.class.php
trust_path/modules/sd2nd/actions/ActiveAbilityListAction.class.php
trust_path/modules/sd2nd/actions/CostumeListAction.class.php
trust_path/modules/sd2nd/actions/LearnedAbilityListAction.class.php
trust_path/modules/sd2nd/actions/LearnedCostumeListAction.class.php
trust_path/modules/sd2nd/actions/LearnedSkillListAction.class.php
trust_path/modules/sd2nd/actions/SkillListAction.class.php
trust_path/modules/sd2nd/admin/class/Sd2ndAdminRenderSystem.class.php
trust_path/modules/sd2nd/admin/class/installer/Sd2ndInstallUtils.class.php
trust_path/modules/sd2nd/admin/class/installer/Sd2ndInstaller.class.php
trust_path/modules/sd2nd/admin/class/installer/Sd2ndUninstaller.class.php
trust_path/modules/sd2nd/admin/class/installer/Sd2ndUpdater.class.php
trust_path/modules/sd2nd/class/AbstractFilterForm.class.php
trust_path/modules/sd2nd/class/AbstractListAction.class.php
trust_path/modules/sd2nd/class/AssetManager.class.php
trust_path/modules/sd2nd/class/Module.class.php

index f91045b..876baeb 100644 (file)
@@ -39,7 +39,7 @@ class Sd2nd_AbilityListAction extends Sd2nd_AbstractUpdateListAction
     **/
     protected function &_getFilterForm()
     {
-        // $filter =& new Sd2nd_AbilityFilterForm();
+        // $filter = new Sd2nd_AbilityFilterForm();
         $filter =& $this->mAsset->getObject('filter', 'ability',false);
         $filter->prepare($this->_getPageNavi(), $this->_getHandler());
         return $filter;
index 6d8ff5e..362ee6d 100644 (file)
@@ -39,7 +39,7 @@ class Sd2nd_ActiveAbilityListAction extends Sd2nd_AbstractListAction
     **/
     protected function &_getFilterForm()
     {
-        // $filter =& new Sd2nd_ActiveAbilityFilterForm();
+        // $filter = new Sd2nd_ActiveAbilityFilterForm();
         $filter =& $this->mAsset->getObject('filter', 'activeAbility',false);
         $filter->prepare($this->_getPageNavi(), $this->_getHandler());
         return $filter;
index 2d91eea..47f2797 100644 (file)
@@ -39,7 +39,7 @@ class Sd2nd_CostumeListAction extends Sd2nd_AbstractUpdateListAction
     **/
     protected function &_getFilterForm()
     {
-        // $filter =& new Sd2nd_CostumeFilterForm();
+        // $filter = new Sd2nd_CostumeFilterForm();
         $filter =& $this->mAsset->getObject('filter', 'costume',false);
         $filter->prepare($this->_getPageNavi(), $this->_getHandler());
         return $filter;
index 42ab0cf..a6d06cf 100644 (file)
@@ -39,7 +39,7 @@ class Sd2nd_LearnedAbilityListAction extends Sd2nd_AbstractListAction
     **/
     protected function &_getFilterForm()
     {
-        // $filter =& new Sd2nd_LearnedAbilityFilterForm();
+        // $filter = new Sd2nd_LearnedAbilityFilterForm();
         $filter =& $this->mAsset->getObject('filter', 'learnedAbility',false);
         $filter->prepare($this->_getPageNavi(), $this->_getHandler());
         return $filter;
index 0f1b5e7..dbf6c5a 100644 (file)
@@ -39,7 +39,7 @@ class Sd2nd_LearnedCostumeListAction extends Sd2nd_AbstractListAction
     **/
     protected function &_getFilterForm()
     {
-        // $filter =& new Sd2nd_LearnedCostumeFilterForm();
+        // $filter = new Sd2nd_LearnedCostumeFilterForm();
         $filter =& $this->mAsset->getObject('filter', 'learned_costume',false);
         $filter->prepare($this->_getPageNavi(), $this->_getHandler());
         return $filter;
index f50fead..7a3708f 100644 (file)
@@ -39,7 +39,7 @@ class Sd2nd_LearnedSkillListAction extends Sd2nd_AbstractListAction
     **/
     protected function &_getFilterForm()
     {
-        // $filter =& new Sd2nd_LearnedSkillFilterForm();
+        // $filter = new Sd2nd_LearnedSkillFilterForm();
         $filter =& $this->mAsset->getObject('filter', 'learnedSkill',false);
         $filter->prepare($this->_getPageNavi(), $this->_getHandler());
         return $filter;
index a32d894..79204a8 100644 (file)
@@ -39,7 +39,7 @@ class Sd2nd_SkillListAction extends Sd2nd_AbstractUpdateListAction
     **/
     protected function &_getFilterForm()
     {
-        // $filter =& new Sd2nd_SkillFilterForm();
+        // $filter = new Sd2nd_SkillFilterForm();
         $filter =& $this->mAsset->getObject('filter', 'skill',false);
         $filter->prepare($this->_getPageNavi(), $this->_getHandler());
         return $filter;
index 0793c92..52f26f4 100644 (file)
@@ -30,7 +30,7 @@ class Sd2nd_AdminRenderSystem extends Legacy_AdminRenderSystem
     {
         $this->mController =& $controller;
     
-        $this->mSmarty =& new Legacy_AdminSmarty();    // TODO will be use other class?
+        $this->mSmarty = new Legacy_AdminSmarty();    // TODO will be use other class?
         $this->mSmarty->register_modifier('theme',array($this,'modifierTheme'));
         $this->mSmarty->register_function('stylesheet',array($this,'functionStylesheet'));
     
index be06ce5..39d692a 100644 (file)
@@ -50,7 +50,7 @@ class Sd2nd_InstallUtils
         }
     
         require_once XOOPS_MODULE_PATH . '/legacy/admin/class/Legacy_SQLScanner.class.php';    // TODO will be use other class?
-        $scanner =& new Legacy_SQLScanner();
+        $scanner = new Legacy_SQLScanner();
         $scanner->setDB_PREFIX(XOOPS_DB_PREFIX);
         $scanner->setDirname($dirname);
         if(!$scanner->loadFile($sqlFilePath))
@@ -92,7 +92,7 @@ class Sd2nd_InstallUtils
     public static function DBquery(/*** string ***/ $query,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log)
     {
         require_once XOOPS_MODULE_PATH . '/legacy/admin/class/Legacy_SQLScanner.class.php';    // TODO will be use other class?
-        $scanner =& new Legacy_SQLScanner();
+        $scanner = new Legacy_SQLScanner();
         $scanner->setDB_PREFIX(XOOPS_DB_PREFIX);
         $scanner->setDirname($module->get('dirname'));
         $scanner->setBuffer($query);
@@ -286,7 +286,7 @@ class Sd2nd_InstallUtils
     
         if(is_array($delTemplates) && count($delTemplates) > 0)
         {
-            $xoopsTpl =& new XoopsTpl();
+            $xoopsTpl = new XoopsTpl();
             $xoopsTpl->clear_cache(null,'mod_' . $module->get('dirname'));
             foreach($delTemplates as $tpl)
             {
@@ -492,7 +492,7 @@ class Sd2nd_InstallUtils
         );
         $tplHandler =& Sd2nd_Utils::getXoopsHandler('tplfile');
     
-        $cri =& new CriteriaCompo();
+        $cri = new CriteriaCompo();
         $cri->add(new Criteria('tpl_type','block'));
         $cri->add(new Criteria('tpl_tplset','default'));
         $cri->add(new Criteria('tpl_module',$module->get('dirname')));
@@ -559,7 +559,7 @@ class Sd2nd_InstallUtils
     
         $blockHandler =& Sd2nd_Utils::getXoopsHandler('block');
         $gpermHandler =& Sd2nd_Utils::getXoopsHandler('groupperm');
-        $cri =& new Criteria('mid',$module->get('mid'));
+        $cri = new Criteria('mid',$module->get('mid'));
         $blocks =& $blockHandler->getObjectsDirectly($cri);
     
         foreach($blocks as $block)
@@ -584,7 +584,7 @@ class Sd2nd_InstallUtils
                 $successFlag = false;
             }
             
-            $cri =& new CriteriaCompo();
+            $cri = new CriteriaCompo();
             $cri->add(new Criteria('gperm_name','block_read'));
             $cri->add(new Criteria('gperm_itemid',$block->get('bid')));
             $cri->add(new Criteria('gperm_modid',1));
@@ -615,8 +615,8 @@ class Sd2nd_InstallUtils
     {
         $dirname = $module->get('dirname');
     
-        $fileReader =& new Legacy_ModinfoX2FileReader($dirname);
-        $dbReader =& new Legacy_ModinfoX2DBReader($dirname);
+        $fileReader = new Legacy_ModinfoX2FileReader($dirname);
+        $dbReader = new Legacy_ModinfoX2DBReader($dirname);
     
         $blocks =& $dbReader->loadBlockInformations();
         $blocks->update($fileReader->loadBlockInformations());
@@ -655,7 +655,7 @@ class Sd2nd_InstallUtils
     public static function updateBlockTemplateByInfo(/*** Legacy_BlockInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log)
     {
         $blockHandler =& Sd2nd_Utils::getModuleHandler('newblocks','legacy');
-        $cri =& new CriteriaCompo();
+        $cri = new CriteriaCompo();
         $cri->add(new Criteria('dirname',$module->get('dirname')));
         $cri->add(new Criteria('func_num',$info->mFuncNum));
         $blocks =& $blockHandler->getObjects($cri);
@@ -679,7 +679,7 @@ class Sd2nd_InstallUtils
     public static function updateBlockByInfo(/*** Legacy_BlockInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log)
     {
         $blockHandler =& Sd2nd_Utils::getModuleHandler('newblocks','legacy');
-        $cri =& new CriteriaCompo();
+        $cri = new CriteriaCompo();
         $cri->add(new Criteria('dirname',$module->get('dirname')));
         $cri->add(new Criteria('func_num',$info->mFuncNum));
         $blocks =& $blockHandler->getObjects($cri);
@@ -787,7 +787,7 @@ class Sd2nd_InstallUtils
     public static function uninstallBlockByFuncNum(/*** int ***/ $func_num,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log)
     {
         $blockHandler =& Sd2nd_Utils::getModuleHandler('newblocks','legacy');
-        $cri =& new CriteriaCompo();
+        $cri = new CriteriaCompo();
         $cri->add(new Criteria('dirname',$module->get('dirname')));
         $cri->add(new Criteria('func_num',$func_num));
         $blocks =& $blockHandler->getObjects($cri);
@@ -870,7 +870,7 @@ class Sd2nd_InstallUtils
     {
         $successFlag = true;
         $configHandler =& Sd2nd_Utils::getXoopsHandler('config');
-        $fileReader =& new Legacy_ModinfoX2FileReader($module->get('dirname'));    // TODO will be use other class?
+        $fileReader = new Legacy_ModinfoX2FileReader($module->get('dirname'));    // TODO will be use other class?
         $preferences =& $fileReader->loadPreferenceInformations();
     
         foreach($preferences->mPreferences as $info)
@@ -1040,7 +1040,7 @@ class Sd2nd_InstallUtils
     {
         $configHandler =& Sd2nd_Utils::getXoopsHandler('config');
     
-        $cri =& new CriteriaCompo();
+        $cri = new CriteriaCompo();
         $cri->add(new Criteria('conf_modid',$module->get('mid')));
         $cri->add(new Criteria('conf_catid',0));
         $cri->add(new Criteria('conf_order',$order));
@@ -1081,8 +1081,8 @@ class Sd2nd_InstallUtils
     {
         $dirname = $module->get('dirname');
     
-        $fileReader =& new Legacy_ModinfoX2FileReader($dirname);
-        $dbReader =& new Legacy_ModinfoX2DBReader($dirname);
+        $fileReader = new Legacy_ModinfoX2FileReader($dirname);
+        $dbReader = new Legacy_ModinfoX2DBReader($dirname);
     
         $configs  =& $dbReader->loadPreferenceInformations();
         $configs->update($fileReader->loadPreferenceInformations());
@@ -1121,7 +1121,7 @@ class Sd2nd_InstallUtils
     public static function updateConfigByInfo(/*** Legacy_PreferenceInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log)
     {
         $configHandler =& Sd2nd_Utils::getXoopsHandler('config');
-        $cri =& new CriteriaCompo();
+        $cri = new CriteriaCompo();
         $cri->add(new Criteria('conf_modid',$module->get('mid')));
         $cri->add(new Criteria('conf_catid',0));
         $cri->add(new Criteria('conf_name',$info->mName));
@@ -1203,7 +1203,7 @@ class Sd2nd_InstallUtils
     public static function updateConfigOrderByInfo(/*** Legacy_PreferenceInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log)
     {
         $configHandler =& Sd2nd_Utils::getXoopsHandler('config');
-        $cri =& new CriteriaCompo();
+        $cri = new CriteriaCompo();
         $cri->add(new Criteria('conf_modid',$module->get('mid')));
         $cri->add(new Criteria('conf_catid',0));
         $cri->add(new Criteria('conf_name',$info->mName));
index 1bb13f4..79436fd 100644 (file)
@@ -41,7 +41,7 @@ class Sd2nd_Installer
     **/
     public function __construct()
     {
-        $this->mLog =& new Legacy_ModuleInstallLog();
+        $this->mLog = new Legacy_ModuleInstallLog();
     }
 
     /**
index 6c6d8cc..5907b4e 100644 (file)
@@ -41,7 +41,7 @@ class Sd2nd_Uninstaller
     **/
     public function __construct()
     {
-        $this->mLog =& new Legacy_ModuleInstallLog();
+        $this->mLog = new Legacy_ModuleInstallLog();
     }
 
     /**
@@ -160,7 +160,7 @@ class Sd2nd_Uninstaller
         Sd2nd_InstallUtils::uninstallAllOfBlocks($this->_mXoopsModule,$this->mLog);
     
         $tplHandler =& Sd2nd_Utils::getXoopsHandler('tplfile');
-        $cri =& new Criteria('tpl_module',$this->_mXoopsModule->get('dirname'));
+        $cri = new Criteria('tpl_module',$this->_mXoopsModule->get('dirname'));
         if(!$tplHandler->deleteAll($cri))
         {
             $this->mLog->addError(
index e8e1df9..41cdd09 100644 (file)
@@ -61,7 +61,7 @@ class Sd2nd_Updater
     **/
     public function __construct()
     {
-        $this->mLog =& new Legacy_ModuleInstallLog();
+        $this->mLog = new Legacy_ModuleInstallLog();
     }
 
     /**
index 2e82428..733e6aa 100644 (file)
@@ -71,7 +71,7 @@ abstract class Sd2nd_AbstractFilterForm
     **/
     public function __construct()
     {
-        $this->_mCriteria =& new CriteriaCompo();
+        $this->_mCriteria = new CriteriaCompo();
     }
 
     /**
index ad111cb..993ed65 100644 (file)
@@ -69,7 +69,7 @@ abstract class Sd2nd_AbstractListAction extends Sd2nd_AbstractAction
     **/
     protected function &_getPageNavi()
     {
-        $navi =& new XCube_PageNavigator($this->_getBaseUrl(), XCUBE_PAGENAVI_START);
+        $navi = new XCube_PageNavigator($this->_getBaseUrl(), XCUBE_PAGENAVI_START);
         return $navi;
     }
 
index b574f99..6c3dd49 100644 (file)
@@ -183,11 +183,11 @@ class Sd2nd_AssetManager
         if($type == 'handler')
         {
             $root =& XCube_Root::getSingleton();
-            $instance =& new $className($root->mController->getDB(),$this->mDirname);
+            $instance = new $className($root->mController->getDB(),$this->mDirname);
         }
         else
         {
-            $instance =& new $className();
+            $instance = new $className();
         }
         return $instance;
     }
index be809b8..923577e 100644 (file)
@@ -360,7 +360,7 @@ class Sd2nd_Module extends Legacy_ModuleAdapter
             . ucfirst($this->mActionName) . 'Action';
         if(class_exists($className))
         {
-            $this->mAction =& new $className();
+            $this->mAction = new $className();
         }
         if(!$this->mAction instanceof Sd2nd_AbstractAction)
         {