/** * _installPreferences * * @param void * * @return void **/ private function _installPreferences() { Trpg_InstallUtils::installAllOfConfigs($this->_mXoopsModule, $this->mLog); }
/** * smartUpdateAllOfConfigs * * @param XoopsModule &$module * @param Legacy_ModuleInstallLog &$log * * @return void **/ public static function smartUpdateAllOfConfigs(&$module, &$log) { $dirname = $module->get('dirname'); $fileReader = new Legacy_ModinfoX2FileReader($dirname); $dbReader = new Legacy_ModinfoX2DBReader($dirname); $configs =& $dbReader->loadPreferenceInformations(); $configs->update($fileReader->loadPreferenceInformations()); foreach ($configs->mPreferences as $config) { switch ($config->mStatus) { case LEGACY_INSTALLINFO_STATUS_UPDATED: Trpg_InstallUtils::updateConfigByInfo($config, $module, $log); break; case LEGACY_INSTALLINFO_STATUS_ORDER_UPDATED: Trpg_InstallUtils::updateConfigOrderByInfo($config, $module, $log); break; case LEGACY_INSTALLINFO_STATUS_NEW: Trpg_InstallUtils::installConfigByInfo($config, $module, $log); break; case LEGACY_INSTALLINFO_STATUS_DELETED: Trpg_InstallUtils::uninstallConfigByOrder($config->mOrder, $module, $log); break; default: break; } } }
/** * _updatePreferences * * @param void * * @return void **/ private function _updatePreferences() { Trpg_InstallUtils::smartUpdateAllOfConfigs($this->_mTargetXoopsModule, $this->mLog); }