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

Back to archive index

Minahito minah****@users*****
2006年 11月 15日 (水) 20:33:20 JST


Index: xoops2jp/html/modules/legacy/admin/class/ModuleUninstaller.class.php
diff -u xoops2jp/html/modules/legacy/admin/class/ModuleUninstaller.class.php:1.1.2.9 xoops2jp/html/modules/legacy/admin/class/ModuleUninstaller.class.php:1.1.2.10
--- xoops2jp/html/modules/legacy/admin/class/ModuleUninstaller.class.php:1.1.2.9	Mon Nov 13 20:11:35 2006
+++ xoops2jp/html/modules/legacy/admin/class/ModuleUninstaller.class.php	Wed Nov 15 20:33:20 2006
@@ -145,6 +145,12 @@
 		if ($installScript != false) {
 			require_once XOOPS_MODULE_PATH . "/" . $this->_mXoopsModule->get('dirname') . "/" . $installScript;
 			$funcName = 'xoops_module_uninstall_' . $this->_mXoopsModule->get('dirname');
+			
+			if (!preg_match("/^[a-zA-Z_][a-zA-Z0-9_]*$/", $funcName)) {
+				$this->mLog->addError(XCUbe_Utils::formatMessage(_AD_LEGACY_ERROR_FAILED_TO_EXECUTE_CALLBACK, $funcName));
+				return;
+			}
+			
 			if (function_exists($funcName)) {
 				if (!call_user_func($funcName, $this->_mXoopsModule)) {
 					$this->mLog->addError(XCube_Utils::formatMessage(_AD_LEGACY_ERROR_FAILED_TO_EXECUTE_CALLBACK, $funcName));
@@ -204,6 +210,10 @@
 		}
 		
 		$this->_processScript();
+		if (!$this->_mForceMode && $this->mLog->hasError()) {
+			$this->_processReport();
+			return false;
+		}
 		
 		$this->_processReport();
 		
Index: xoops2jp/html/modules/legacy/admin/class/ModuleUpdater.class.php
diff -u xoops2jp/html/modules/legacy/admin/class/ModuleUpdater.class.php:1.1.2.14 xoops2jp/html/modules/legacy/admin/class/ModuleUpdater.class.php:1.1.2.15
--- xoops2jp/html/modules/legacy/admin/class/ModuleUpdater.class.php:1.1.2.14	Tue Nov 14 20:53:34 2006
+++ xoops2jp/html/modules/legacy/admin/class/ModuleUpdater.class.php	Wed Nov 15 20:33:20 2006
@@ -372,6 +372,10 @@
 		// call bacl 'onUpdate'
 		//
 		$this->_processScript();
+		if (!$this->_mForceMode && $this->mLog->hasError()) {
+			$this->_processReport();
+			return false;
+		}
 		
 		$this->_processReport();
 		
Index: xoops2jp/html/modules/legacy/admin/class/ModuleInstaller.class.php
diff -u xoops2jp/html/modules/legacy/admin/class/ModuleInstaller.class.php:1.1.2.7 xoops2jp/html/modules/legacy/admin/class/ModuleInstaller.class.php:1.1.2.8
--- xoops2jp/html/modules/legacy/admin/class/ModuleInstaller.class.php:1.1.2.7	Mon Nov 13 20:11:35 2006
+++ xoops2jp/html/modules/legacy/admin/class/ModuleInstaller.class.php	Wed Nov 15 20:33:20 2006
@@ -189,6 +189,12 @@
         if ($installScript != false) {
             require_once XOOPS_MODULE_PATH . "/" . $this->_mXoopsModule->get('dirname') . "/" . $installScript;
             $funcName = 'xoops_module_install_' . $this->_mXoopsModule->get('dirname');
+			
+			if (!preg_match("/^[a-zA-Z_][a-zA-Z0-9_]*$/", $funcName)) {
+				$this->mLog->addError(XCUbe_Utils::formatMessage(_AD_LEGACY_ERROR_FAILED_TO_EXECUTE_CALLBACK, $funcName));
+				return;
+			}
+			
             if (function_exists($funcName)) {
                 if (!call_user_func($funcName, $this->_mXoopsModule)) {
                     $this->mLog->addError(XCUbe_Utils::formatMessage(_AD_LEGACY_ERROR_FAILED_TO_EXECUTE_CALLBACK, $funcName));
@@ -248,6 +254,10 @@
 		}
 		
 		$this->_processScript();
+		if (!$this->_mForceMode && $this->mLog->hasError()) {
+			$this->_processReport();
+			return false;
+		}
 		
 		$this->_processReport();
 		


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