コード例 #1
0
 function _processReport()
 {
     if (!$this->mLog->hasError()) {
         $this->mLog->add(XCube_Utils::formatMessage(_AD_LEGACY_MESSAGE_UPDATING_MODULE_SUCCESSFUL, $this->_mCurrentXoopsModule->get('name')));
     } else {
         $this->mLog->addError(XCube_Utils::formatMessage(_AD_LEGACY_ERROR_UPDATING_MODULE_FAILURE, $this->_mCurrentXoopsModule->get('name')));
     }
 }
コード例 #2
0
 function _processReport()
 {
     if (!$this->mLog->hasError()) {
         $this->mLog->add(XCube_Utils::formatString(_AD_LEGACY_MESSAGE_INSTALLATION_MODULE_SUCCESSFUL, $this->_mXoopsModule->get('name')));
     } else {
         $this->mLog->addError(XCube_Utils::formatString(_AD_LEGACY_ERROR_INSTALLATION_MODULE_FAILURE, $this->_mXoopsModule->get('name')));
     }
 }
コード例 #3
0
 /**
  * process report.
  */
 private function _processReport()
 {
     $dirname = $this->_mCurrentXoopsModule->get('dirname');
     $constpref = '_MI_' . strtoupper($dirname);
     if (!$this->mLog->hasError()) {
         $this->mLog->add(XCube_Utils::formatString(constant($constpref . '_INSTALL_MSG_MODULE_UPDATED'), $this->_mCurrentXoopsModule->get('name')));
     } else {
         $this->mLog->add(XCube_Utils::formatString(constant($constpref . '_INSTALL_ERROR_MODULE_UPDATED'), $this->_mCurrentXoopsModule->get('name')));
     }
 }
コード例 #4
0
 /**
  * process report.
  */
 private function _processReport()
 {
     $dirname = $this->_mXoopsModule->get('dirname');
     $constpref = '_MI_' . strtoupper($dirname);
     if (!$this->mLog->hasError()) {
         $this->mLog->add(XCube_Utils::formatString(constant($constpref . '_INSTALL_MSG_MODULE_INSTALLED'), $this->_mXoopsModule->getInfo('name')));
     } elseif (is_object($this->_mXoopsModule)) {
         $this->mLog->addError(XCube_Utils::formatString(constant($constpref . '_INSTALL_ERROR_MODULE_INSTALLED'), $this->_mXoopsModule->getInfo('name')));
     } else {
         $this->mLog->addError(XCube_Utils::formatString(constant($constpref . '_INSTALL_ERROR_MODULE_INSTALLED'), 'something'));
     }
 }
コード例 #5
0
 /**
  * Copy the value of $oldConfig to the value of $cubeConfig, and try saving
  * it.
  * 
  * @access private
  * @param XoopsConfigItem $oldConfig
  * @param XoopsConfigItem $cubeConfig
  * @param string $dirname A name of module directory for logging.
  */
 function _copy(&$oldConfig, &$cubeConfig, $dirname)
 {
     if (!is_object($oldConfig) || !is_object($cubeConfig)) {
         $this->mLog->addError(XCube_Utils::formatMessage(_MI_XUPGRADE_ERROR_CONFIGS_WRONG));
         return;
     }
     $value =& $oldConfig->getConfValueForOutput('conf_value');
     if (is_array($value)) {
         $value = implode('|', $value);
     }
     $cubeConfig->setConfValueForInput($value);
     if ($this->mConfigHandler->insertConfig($cubeConfig)) {
         $this->mLog->add(XCube_Utils::formatMessage(_MI_XUPGRADE_MESSAGE_PORTED_CONFIG, $cubeConfig->get('conf_name'), 'user'));
     } else {
         $this->mLog->addError(XCube_Utils::formatMessage(_MI_XUPGRADE_ERROR_PORTED_CONFIG, $cubeConfig->get('conf_name'), 'user'));
     }
     if ($this->mConfigHandler->deleteConfig($oldConfig)) {
         $this->mLog->add(XCube_Utils::formatMessage(_MI_XUPGRADE_MESSAGE_DELETED_CONFIG, $oldConfig->get('conf_name')));
     } else {
         $this->mLog->addError(XCube_Utils::formatMessage(_MI_XUPGRADE_ERROR_DELETED_CONFIG, $oldConfig->get('conf_name')));
     }
 }