Minahito
minah****@users*****
2006年 7月 1日 (土) 16:24:17 JST
Index: xoops2jp/html/modules/base/admin/class/AbstractModuleInstaller.class.php diff -u xoops2jp/html/modules/base/admin/class/AbstractModuleInstaller.class.php:1.1.2.6 xoops2jp/html/modules/base/admin/class/AbstractModuleInstaller.class.php:1.1.2.7 --- xoops2jp/html/modules/base/admin/class/AbstractModuleInstaller.class.php:1.1.2.6 Tue Mar 28 22:28:56 2006 +++ xoops2jp/html/modules/base/admin/class/AbstractModuleInstaller.class.php Sat Jul 1 16:24:17 2006 @@ -32,40 +32,58 @@ function Legacy_AbstractModuleInstaller($dirname) { $this->mDirname = $dirname; - $this->mLog = new Legacy_ModuleUtilsSimpleLog(); + $this->mLog =& new Legacy_ModuleUtilsSimpleLog(); } /** + * Start callback to required member functions with module install + * framework. + * * @return bool */ function execute() { $this->mModule =& $this->loadModuleObject($this->mDirname); - if (!is_object($this->mModule)) + + if (!is_object($this->mModule)) { + $this->_processReport(); return false; + } $this->_installTable(); - if (!$this->mForceMode && $this->mLog->hasError()) + if (!$this->mForceMode && $this->mLog->hasError()) { + $this->_processReport(); return false; + } $this->_installModule(); - if (!$this->mForceMode && $this->mLog->hasError()) + if (!$this->mForceMode && $this->mLog->hasError()) { + $this->_processReport(); return false; + } $this->_installTemplate(); - if (!$this->mForceMode && $this->mLog->hasError()) + if (!$this->mForceMode && $this->mLog->hasError()) { + $this->_processReport(); return false; + } $this->_installBlock(); - if (!$this->mForceMode && $this->mLog->hasError()) + if (!$this->mForceMode && $this->mLog->hasError()) { + $this->_processReport(); return false; + } $this->_installPreference(); - if (!$this->mForceMode && $this->mLog->hasError()) + if (!$this->mForceMode && $this->mLog->hasError()) { + $this->_processReport(); return false; + } $this->_processScript(); - + + $this->_processReport(); + return true; } @@ -130,6 +148,14 @@ { $this->mForceMode = $flag; } + + /** + * This member function is called back at the last part of execute(). + * Report the conclusion to the log. + */ + function _processReport() + { + } /** * Return log instance.