/** * @see AdminController::processUpdateOptions() */ public function processUpdateOptions() { if ($this->isGeoLiteCityAvailable()) { Configuration::updateValue('PS_GEOLOCATION_ENABLED', (int) Tools::getValue('PS_GEOLOCATION_ENABLED')); } elseif (Tools::getValue('PS_GEOLOCATION_ENABLED')) { $this->errors[] = $this->trans('The geolocation database is unavailable.', array(), 'Admin.International.Notification'); } if (empty($this->errors)) { if (!is_array(Tools::getValue('countries')) || !count(Tools::getValue('countries'))) { $this->errors[] = $this->trans('Country selection is invalid.', array(), 'Admin.International.Notification'); } else { Configuration::updateValue('PS_GEOLOCATION_BEHAVIOR', !(int) Tools::getValue('PS_GEOLOCATION_BEHAVIOR') ? _PS_GEOLOCATION_NO_CATALOG_ : _PS_GEOLOCATION_NO_ORDER_); Configuration::updateValue('PS_GEOLOCATION_NA_BEHAVIOR', (int) Tools::getValue('PS_GEOLOCATION_NA_BEHAVIOR')); Configuration::updateValue('PS_ALLOWED_COUNTRIES', implode(';', Tools::getValue('countries'))); } if (!Validate::isCleanHtml(Tools::getValue('PS_GEOLOCATION_WHITELIST'))) { $this->errors[] = $this->trans('Invalid whitelist', array(), 'Admin.International.Notification'); } else { Configuration::updateValue('PS_GEOLOCATION_WHITELIST', str_replace("\n", ';', str_replace("\r", '', Tools::getValue('PS_GEOLOCATION_WHITELIST')))); } } return parent::processUpdateOptions(); }
protected function processUpdateOptions() { parent::processUpdateOptions(); Tools::generateHtaccess(); }
protected function processUpdateOptions() { parent::processUpdateOptions(); if (!count($this->errors)) { Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminThemes') . '&conf=6'); } }