[xoops-cvslog 3400] CVS update: xoops2jp/html/modules/base/admin/class

Back to archive index

Minahito minah****@users*****
2006年 7月 1日 (土) 16:24:42 JST


Index: xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php
diff -u xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.12 xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.13
--- xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.12	Thu May 18 23:04:04 2006
+++ xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php	Sat Jul  1 16:24:42 2006
@@ -61,7 +61,7 @@
                 $adminPerm->setVar('gperm_name', 'module_admin');
 
                 if (!$gpermHandler->insert($adminPerm)) {
-                    $log->addError("Could not set admin permission " . $this->mModule->getVar('mid'));
+                    $log->addError(_AD_BASE_ERROR_COULD_NOT_SET_ADMIN_PERMISSION);
                 }
             }
 
@@ -80,7 +80,7 @@
                             $adminPerm->setVar('gperm_itemid', $modversion['category']);
                             $adminPerm->setVar('gperm_name', 'system_admin');
                             if (!$gpermHandler->insert($adminPerm)) {
-                                $log->addError("Could not set system admin permission " . $this->mModule->getVar('mid'));
+                                $log->addError(_AD_BASE_ERROR_COULD_NOT_SET_SYSTEM_PERMISSION);
                             }
                             unset($sysAdminPerm);
                         }
@@ -102,7 +102,7 @@
                         $readPerm->setVar('gperm_name', 'module_read');
 
                         if (!$gpermHandler->insert($readPerm)) {
-                            $log->addError("Could not set read permission " . $this->mModule->getVar('mid'));
+                            $log->addError(_AD_BASE_ERROR_COULD_NOT_SET_READ_PERMISSION);
                         }
                     }
                 } else {
@@ -116,7 +116,7 @@
                         $readPerm->setVar('gperm_name', 'module_read');
 
                         if (!$gpermHandler->insert($readPerm)) {
-                            $log->addError("Could not set read permission " . $this->mModule->getVar('mid'));
+                            $log->addError(_AD_BASE_ERROR_COULD_NOT_SET_READ_PERMISSION);
                         }
                     }
                 }
@@ -189,11 +189,26 @@
             $funcName = 'xoops_module_install_' . $this->mModule->getVar('dirname');
             if (function_exists($funcName)) {
                 if (!call_user_func($funcName, $this->mModule)) {
-                    $this->mLog->addError("Failed to execute " . $funcName);
+                    $this->mLog->addError(XCUbe_Utils::formatMessage(_AD_BASE_ERROR_FAILED_TO_EXECUTE_CALLBACK, $funcName));
                 }
             }
         }
     }
+	
+	function _processReport()
+	{
+		if (!$this->mLog->hasError()) {
+			$this->mLog->add(XCube_Utils::formatMessage(_AD_BASE_MESSAGE_INSTALLATION_MODULE_SUCCESSFUL, $this->mModule->get('name')));
+		}
+		else {
+			if (is_object($this->mModule)) {
+				$this->mModule->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_INSTALLATION_MODULE_FAILURE, $this->mModule->get('name')));
+			}
+			else {
+				$this->mModule->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_INSTALLATION_MODULE_FAILURE, $this->mDirname));
+			}
+		}
+	}
 
     function hasAgree()
     {


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