From 0dae184d2d351fdf9479b4c3f48e08eb9d6863a6 Mon Sep 17 00:00:00 2001 From: vChabot Date: Sat, 19 May 2012 12:38:08 +0000 Subject: [PATCH] // update condition --- controllers/admin/AdminShopUrlController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminShopUrlController.php b/controllers/admin/AdminShopUrlController.php index a8264bf6c..865685353 100644 --- a/controllers/admin/AdminShopUrlController.php +++ b/controllers/admin/AdminShopUrlController.php @@ -98,8 +98,10 @@ class AdminShopUrlControllerCore extends AdminController public function renderForm() { + $update_htaccess = Tools::modRewriteActive() && ((file_exists('.htaccess') && is_writable('.htaccess')) || is_writable(dirname('.htaccess'))); + $this->multiple_fieldsets = true; - if (!Configuration::get('PS_REWRITING_SETTINGS')) + if (!$update_htaccess) $desc_virtual_uri = array( $this->l('You need to activate the URL Rewriting if you want to add a virtual URI.') ); @@ -217,7 +219,7 @@ class AdminShopUrlControllerCore extends AdminController 'type' => 'text', 'label' => $this->l('Virtual URI:'), 'name' => 'virtual_uri', - 'disabled' => !Configuration::get('PS_REWRITING_SETTINGS'), + 'disabled' => !$update_htaccess, 'desc' => $desc_virtual_uri, 'size' => 50, ),