[-] BO: Remove useless warning #PSCFV-5122

This commit is contained in:
rGaillard
2012-11-15 16:19:30 +00:00
parent b5d9afc158
commit 0e93f8cebe
@@ -67,8 +67,7 @@ class AdminWebserviceControllerCore extends AdminController
) )
); );
if (file_exists(_PS_ROOT_DIR_.'/.htaccess')) $this->fields_options = array(
$this->fields_options = array(
'general' => array( 'general' => array(
'title' => $this->l('Configuration'), 'title' => $this->l('Configuration'),
'fields' => array( 'fields' => array(
@@ -230,18 +229,18 @@ class AdminWebserviceControllerCore extends AdminController
protected function afterAdd($object) protected function afterAdd($object)
{ {
Tools::generateHtaccess();
WebserviceKey::setPermissionForAccount($object->id, Tools::getValue('resources', array())); WebserviceKey::setPermissionForAccount($object->id, Tools::getValue('resources', array()));
} }
protected function afterUpdate($object) protected function afterUpdate($object)
{ {
Tools::generateHtaccess();
WebserviceKey::setPermissionForAccount($object->id, Tools::getValue('resources', array())); WebserviceKey::setPermissionForAccount($object->id, Tools::getValue('resources', array()));
} }
public function checkForWarning() public function checkForWarning()
{ {
if (!file_exists(_PS_ROOT_DIR_.'/.htaccess'))
$this->warnings[] = $this->l('In order to enable the PrestaShop Webservice, please generate the .htaccess file in "Preferences" > "SEO & URLs".');
if (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') === false) if (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') === false)
{ {
$this->warnings[] = $this->l('To avoid operating problems, please use an Apache server.'); $this->warnings[] = $this->l('To avoid operating problems, please use an Apache server.');