[xoops-cvslog 5502] CVS update: xoops2jp/html/modules/legacy/admin/class

Back to archive index

Minahito minah****@users*****
2006年 10月 26日 (木) 00:27:23 JST


Index: xoops2jp/html/modules/legacy/admin/class/ModuleUpdateFramework.class.php
diff -u xoops2jp/html/modules/legacy/admin/class/ModuleUpdateFramework.class.php:1.1.2.1 xoops2jp/html/modules/legacy/admin/class/ModuleUpdateFramework.class.php:1.1.2.2
--- xoops2jp/html/modules/legacy/admin/class/ModuleUpdateFramework.class.php:1.1.2.1	Thu Oct 19 19:23:23 2006
+++ xoops2jp/html/modules/legacy/admin/class/ModuleUpdateFramework.class.php	Thu Oct 26 00:27:23 2006
@@ -33,31 +33,39 @@
 	function &loadModuleObject($dirname)
 	{
 		$ret = null;
-		
-		$module =& parent::loadModuleObject($dirname);
+
+		$moduleHandler =& xoops_gethandler('module');
+		$module =& $moduleHandler->getByDirname($dirname);
+
 		if (!is_object($module)) {
 			return $ret;
 		}
 		
+		$this->mPreVersion = $module->get('version');
+        $name = $module->get('name','n');
+		$module->loadInfoAsVar($dirname);
+		$module->set('name', $name, true);
+		
 		ksort($this->_mMilestone);
 		
 		foreach ($this->_mMilestone as $version => $value) {
 			if ($version > $this->mPreVersion) {
 				$this->_mTargetVersion = $version;
+				$module->set('version', $version);
+				
 				$this->_mIsEnableFramework = true;
 				return $module;
 			}
 		}
-		
+
 		$this->_mTargetVersion = intval($module->modinfo['version'] * 100);
 		
 		return $module;
 	}
 
-	function _installModule()
+	function updateXoopsModule()
 	{
 		$moduleHandler =& xoops_gethandler('module');
-		$this->mModule->set('version', $this->_mTargetVersion);
 		if (!$moduleHandler->insert($this->mModule)) {
 			$this->mLog->addError("*Could not install module information*");
 			return false;
@@ -79,6 +87,8 @@
 			$method = $this->_mMilestone[$this->_mTargetVersion];
 
 			if (is_callable(array($this, $method))) {
+				$this->mModule->set('version', $this->_mTargetVersion);
+				
 				$this->$method();
 				
 				$this->_processReport();


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