From 0e93f8cebeeaed940a4fc3e70ba4099e4cb3d4ee Mon Sep 17 00:00:00 2001 From: rGaillard Date: Thu, 15 Nov 2012 16:19:30 +0000 Subject: [PATCH] [-] BO: Remove useless warning #PSCFV-5122 --- controllers/admin/AdminWebserviceController.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/controllers/admin/AdminWebserviceController.php b/controllers/admin/AdminWebserviceController.php index 764feefa5..06a82ef8d 100755 --- a/controllers/admin/AdminWebserviceController.php +++ b/controllers/admin/AdminWebserviceController.php @@ -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( 'title' => $this->l('Configuration'), 'fields' => array( @@ -230,18 +229,18 @@ class AdminWebserviceControllerCore extends AdminController protected function afterAdd($object) { + Tools::generateHtaccess(); WebserviceKey::setPermissionForAccount($object->id, Tools::getValue('resources', array())); } protected function afterUpdate($object) { + Tools::generateHtaccess(); WebserviceKey::setPermissionForAccount($object->id, Tools::getValue('resources', array())); } 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) { $this->warnings[] = $this->l('To avoid operating problems, please use an Apache server.');