Permalink
Browse files

[legacy] correction of updater, uninstaller for X2 style custom one

  • Loading branch information...
nao-pon committed May 3, 2015
1 parent 05c66af commit 280f1735ed005fbf76f0735f30a500157ab0b17c
@@ -174,7 +174,11 @@ function _processScript()
}
if (function_exists($funcName)) {
if (!call_user_func($funcName, $this->_mXoopsModule, new XCube_Ref($this->mLog))) {
// Because X2 can use reference parameter, Legacy doesn't use the following code;'
// if (!call_user_func($funcName, $this->_mXoopsModule, new XCube_Ref($this->mLog))) {
$result = $funcName($this->_mXoopsModule, new XCube_Ref($this->mLog));
if (!$result) {
$this->mLog->addError(XCube_Utils::formatString(_AD_LEGACY_ERROR_FAILED_TO_EXECUTE_CALLBACK, $funcName));
}
}
@@ -274,7 +274,11 @@ function _processScript()
require_once XOOPS_MODULE_PATH . "/" . $this->_mTargetXoopsModule->get('dirname') . "/" . $installScript;
$funcName = 'xoops_module_update_' . $this->_mTargetXoopsModule->get('dirname');
if (function_exists($funcName)) {
if (!call_user_func($funcName, $this->_mTargetXoopsModule, $this->getCurrentVersion(), new XCube_Ref($this->mLog))) {
// Because X2 can use reference parameter, Legacy doesn't use the following code;'
//if (!call_user_func($funcName, $this->_mTargetXoopsModule, $this->getCurrentVersion(), new XCube_Ref($this->mLog))) {
$result = $funcName($this->_mTargetXoopsModule, $this->getCurrentVersion(), new XCube_Ref($this->mLog));
if (!$result) {
$this->mLog->addError("Failed to execute " . $funcName);
}
}

0 comments on commit 280f173

Please sign in to comment.