execute() public method

Save site settings.
public execute ( $request )
Ejemplo n.º 1
0
 /**
  * Save the from parameters.
  */
 function execute()
 {
     parent::execute();
     $siteSettingsDao =& $this->siteSettingsDao;
     $siteSettingsDao->updateSetting('useAlphalist', (bool) $this->getData('useAlphalist'), 'bool');
     $siteSettingsDao->updateSetting('usePaging', (bool) $this->getData('usePaging'), 'bool');
 }
Ejemplo n.º 2
0
 /**
  * Save the from parameters.
  */
 function execute()
 {
     parent::execute();
     $siteSettingsDao =& $this->siteSettingsDao;
     /* @var $siteSettingsDao SiteSettingsDAO */
     $siteSettingsDao->updateSetting('useAlphalist', (bool) $this->getData('useAlphalist'), 'bool');
     $siteSettingsDao->updateSetting('usePaging', (bool) $this->getData('usePaging'), 'bool');
     $siteSettingsDao->updateSetting('defaultMetricType', $this->getData('defaultMetricType'), 'string');
     $siteSettingsDao->updateSetting('preventManagerPluginManagement', (bool) $this->getData('preventManagerPluginManagement'), 'bool');
 }
Ejemplo n.º 3
0
 function execute()
 {
     if (parent::execute()) {
         $site =& Request::getSite();
         $site->updateSetting('enableSubmit', $this->getData('enableSubmit') ? 1 : 0);
         $site->updateSetting('disableSubmissions', $this->getData('disableSubmissions') ? 1 : 0);
         $site->updateSetting('theme', $this->getData('theme'));
     }
     return false;
 }
 /**
  * Save site settings.
  */
 function execute($request)
 {
     parent::execute($request);
     $siteDao = DAORegistry::getDAO('SiteDAO');
     $site = $siteDao->getSite();
     $site->setRedirect($this->getData('redirect'));
     $site->setMinPasswordLength($this->getData('minPasswordLength'));
     $siteSettingsDao = $this->siteSettingsDao;
     foreach ($this->getLocaleFieldNames() as $setting) {
         $siteSettingsDao->updateSetting($setting, $this->getData($setting), null, true);
     }
     $siteSettingsDao->updateSetting('defaultMetricType', $this->getData('defaultMetricType'));
     // Activate the selected theme plugin
     $selectedThemePluginPath = $this->getData('themePluginPath');
     $site->updateSetting('themePluginPath', $selectedThemePluginPath);
     $siteDao->updateObject($site);
     // Save block plugins context positions.
     import('lib.pkp.classes.controllers.listbuilder.ListbuilderHandler');
     ListbuilderHandler::unpack($request, $request->getUserVar('blocks'), array($this, 'deleteEntry'), array($this, 'insertEntry'), array($this, 'updateEntry'));
     return true;
 }
Ejemplo n.º 5
0
 /**
  * Save site settings.
  */
 function execute($request)
 {
     parent::execute($request);
     $siteDao = DAORegistry::getDAO('SiteDAO');
     $site = $siteDao->getSite();
     $site->setRedirect($this->getData('redirect'));
     $site->setMinPasswordLength($this->getData('minPasswordLength'));
     $siteSettingsDao = $this->siteSettingsDao;
     foreach ($this->getLocaleFieldNames() as $setting) {
         $siteSettingsDao->updateSetting($setting, $this->getData($setting), null, true);
     }
     $siteSettingsDao->updateSetting('defaultMetricType', $this->getData('defaultMetricType'));
     // Activate the selected theme plugin
     $selectedThemePluginPath = $this->getData('themePluginPath');
     $site->updateSetting('themePluginPath', $selectedThemePluginPath);
     $siteDao->updateObject($site);
     return true;
 }