[xoops-cvslog 5725] CVS update: xoops2jp/html/modules/legacy/admin/actions

Back to archive index

Minahito minah****@users*****
2006年 11月 9日 (木) 16:21:15 JST


Index: xoops2jp/html/modules/legacy/admin/actions/ModuleInstallAction.class.php
diff -u xoops2jp/html/modules/legacy/admin/actions/ModuleInstallAction.class.php:1.1.2.3 xoops2jp/html/modules/legacy/admin/actions/ModuleInstallAction.class.php:1.1.2.4
--- xoops2jp/html/modules/legacy/admin/actions/ModuleInstallAction.class.php:1.1.2.3	Thu Nov  2 00:01:08 2006
+++ xoops2jp/html/modules/legacy/admin/actions/ModuleInstallAction.class.php	Thu Nov  9 16:21:15 2006
@@ -130,33 +130,7 @@
 	function &_getInstaller()
 	{
 		$dirname = $this->mXoopsModule->get('dirname');
-		$this->mXoopsModule->loadInfo($dirname, false);
-
-		$info = $this->mXoopsModule->modinfo;
-			
-		if (isset($info['legacy_installer']) && is_array($info['legacy_installer']) && isset($info['legacy_installer']['installer'])) {
-			$updateInfo = $info['legacy_installer']['installer'];
-				
-			$className = $updateInfo['class'];
-			$filePath = isset($updateInfo['filepath']) ? $updateInfo['filepath'] : XOOPS_MODULE_PATH . "/${dirname}/admin/class/${className}.class.php";
-			$namespace = isset($updateInfo['namespace']) ? $updateInfo['namespace'] : ucfirst($dirname);
-				
-			if ($namespace != null) {
-				$className = "${namespace}_${className}";
-			}
-				
-			if (!class_exists($className) && file_exists($filePath)) {
-				require_once $filePath;
-			}
-				
-			if (class_exists($className)) {
-				$installer =& new $className();
-				return $installer;
-			}
-		}
-		
-		$installer =& new Legacy_ModuleInstaller();
-		return $installer;
+		return Legacy_ModuleInstallUtils::createInstaller($dirname);
 	}
 		
 	function _setupActionForm()
Index: xoops2jp/html/modules/legacy/admin/actions/ModuleUpdateAction.class.php
diff -u xoops2jp/html/modules/legacy/admin/actions/ModuleUpdateAction.class.php:1.1.2.7 xoops2jp/html/modules/legacy/admin/actions/ModuleUpdateAction.class.php:1.1.2.8
--- xoops2jp/html/modules/legacy/admin/actions/ModuleUpdateAction.class.php:1.1.2.7	Thu Nov  2 13:54:00 2006
+++ xoops2jp/html/modules/legacy/admin/actions/ModuleUpdateAction.class.php	Thu Nov  9 16:21:15 2006
@@ -133,33 +133,7 @@
 	function &_getInstaller()
 	{
 		$dirname = $this->mXoopsModule->get('dirname');
-		$this->mXoopsModule->loadInfo($dirname, false);
-
-		$info = $this->mXoopsModule->modinfo;
-			
-		if (isset($info['legacy_installer']) && is_array($info['legacy_installer']) && isset($info['legacy_installer']['updater'])) {
-			$updateInfo = $info['legacy_installer']['updater'];
-				
-			$className = $updateInfo['class'];
-			$filePath = isset($updateInfo['filepath']) ? $updateInfo['filepath'] : XOOPS_MODULE_PATH . "/${dirname}/admin/class/${className}.class.php";
-			$namespace = isset($updateInfo['namespace']) ? $updateInfo['namespace'] : ucfirst($dirname);
-				
-			if ($namespace != null) {
-				$className = "${namespace}_${className}";
-			}
-				
-			if (!class_exists($className) && file_exists($filePath)) {
-				require_once $filePath;
-			}
-				
-			if (class_exists($className)) {
-				$installer =& new $className();
-				return $installer;
-			}
-		}
-		
-		$installer =& new Legacy_ModulePhasedUpgrader();
-		return $installer;
+		Legacy_ModuleInstallUtils::createUpdater($dirname);
 	}
 	
 	function getDefaultView(&$controller, &$xoopsUser)
Index: xoops2jp/html/modules/legacy/admin/actions/ModuleUninstallAction.class.php
diff -u xoops2jp/html/modules/legacy/admin/actions/ModuleUninstallAction.class.php:1.1.2.4 xoops2jp/html/modules/legacy/admin/actions/ModuleUninstallAction.class.php:1.1.2.5
--- xoops2jp/html/modules/legacy/admin/actions/ModuleUninstallAction.class.php:1.1.2.4	Thu Nov  2 00:01:25 2006
+++ xoops2jp/html/modules/legacy/admin/actions/ModuleUninstallAction.class.php	Thu Nov  9 16:21:15 2006
@@ -121,33 +121,7 @@
 	function &_getInstaller()
 	{
 		$dirname = $this->mXoopsModule->get('dirname');
-		$this->mXoopsModule->loadInfo($dirname, false);
-
-		$info = $this->mXoopsModule->modinfo;
-			
-		if (isset($info['legacy_installer']) && is_array($info['legacy_installer']) && isset($info['legacy_installer']['uninstaller'])) {
-			$updateInfo = $info['legacy_installer']['uninstaller'];
-				
-			$className = $updateInfo['class'];
-			$filePath = isset($updateInfo['filepath']) ? $updateInfo['filepath'] : XOOPS_MODULE_PATH . "/${dirname}/admin/class/${className}.class.php";
-			$namespace = isset($updateInfo['namespace']) ? $updateInfo['namespace'] : ucfirst($dirname);
-				
-			if ($namespace != null) {
-				$className = "${namespace}_${className}";
-			}
-				
-			if (!class_exists($className) && file_exists($filePath)) {
-				require_once $filePath;
-			}
-				
-			if (class_exists($className)) {
-				$installer =& new $className();
-				return $installer;
-			}
-		}
-		
-		$installer =& new Legacy_ModuleUninstaller();
-		return $installer;
+		return Legacy_ModuleInstallUtils::createUninstaller($dirname);
 	}
 	
 	function _setupActionForm()


xoops-cvslog メーリングリストの案内
Back to archive index