Ejemplo n.º 1
0
 /**
  * _installPreferences
  * 
  * @param   void
  * 
  * @return  void
  **/
 private function _installPreferences()
 {
     Xcforum_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:
                 Xcforum_InstallUtils::updateConfigByInfo($config, $module, $log);
                 break;
             case LEGACY_INSTALLINFO_STATUS_ORDER_UPDATED:
                 Xcforum_InstallUtils::updateConfigOrderByInfo($config, $module, $log);
                 break;
             case LEGACY_INSTALLINFO_STATUS_NEW:
                 Xcforum_InstallUtils::installConfigByInfo($config, $module, $log);
                 break;
             case LEGACY_INSTALLINFO_STATUS_DELETED:
                 Xcforum_InstallUtils::uninstallConfigByOrder($config->mOrder, $module, $log);
                 break;
             default:
                 break;
         }
     }
 }
Ejemplo n.º 3
0
 /**
  * _updatePreferences
  * 
  * @param   void
  * 
  * @return  void
  **/
 private function _updatePreferences()
 {
     Xcforum_InstallUtils::smartUpdateAllOfConfigs($this->_mTargetXoopsModule, $this->mLog);
 }