diff --git a/controllers/admin/AdminMetaController.php b/controllers/admin/AdminMetaController.php index 0a61235d2..e3df6e62a 100644 --- a/controllers/admin/AdminMetaController.php +++ b/controllers/admin/AdminMetaController.php @@ -51,7 +51,7 @@ class AdminMetaControllerCore extends AdminController 'general' => array( 'title' => $this->l('URLs Setup'), 'fields' => array( - 'PS_REWRITING_SETTINGS' => array('title' => $this->l('Friendly URL'), 'desc' => $this->l('Enable only if your server allows URL rewriting (recommended)').'
', 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), + 'PS_REWRITING_SETTINGS' => array('title' => $this->l('Friendly URL'), 'desc' => $this->l('Enable only if your server allows URL rewriting (recommended)'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_CANONICAL_REDIRECT' => array('title' => $this->l('Automatically redirect to Canonical url'), 'desc' => $this->l('Recommended but your theme must be compliant'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), ), 'submit' => array() @@ -247,6 +247,15 @@ class AdminMetaControllerCore extends AdminController Configuration::updateValue('PS_ROUTE_'.$routeID, $rule); } + /** + * Called when PS_REWRITING_SETTINGS option is saved + */ + public function updateOptionPsRewritingSettings() + { + Configuration::updateValue('PS_REWRITING_SETTINGS', (int)Tools::getValue('PS_REWRITING_SETTINGS')); + Tools::generateHtaccess(); + } + public function updateOptionPsRouteProductRule() { $this->checkAndUpdateRoute('product_rule');