// Moved layered rules from top to bottom in order to avoid conflicts

This commit is contained in:
Damien Metzger
2013-03-12 10:16:54 +01:00
parent 13b796923a
commit 63ef3f3e8c
2 changed files with 17 additions and 12 deletions

View File

@@ -45,18 +45,6 @@ class DispatcherCore
* @var array List of default routes
*/
public $default_routes = array(
'layered_rule' => array(
'controller' => 'category',
'rule' => '{id}-{rewrite}{/:selected_filters}',
'keywords' => array(
'id' => array('regexp' => '[0-9]+', 'param' => 'id_category'),
/* Selected filters is used by the module blocklayered */
'selected_filters' => array('regexp' => '.*', 'param' => 'selected_filters'),
'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
),
),
'category_rule' => array(
'controller' => 'category',
'rule' => '{id}-{rewrite}',
@@ -136,6 +124,19 @@ class DispatcherCore
'tags' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
),
),
// Must be after the product and category rules in order to avoid conflict
'layered_rule' => array(
'controller' => 'category',
'rule' => '{id}-{rewrite}{/:selected_filters}',
'keywords' => array(
'id' => array('regexp' => '[0-9]+', 'param' => 'id_category'),
/* Selected filters is used by the module blocklayered */
'selected_filters' => array('regexp' => '.*', 'param' => 'selected_filters'),
'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
),
),
);
/**

View File

@@ -649,6 +649,10 @@ class AdminPerformanceControllerCore extends AdminController
$base_urls['_MEDIA_SERVER_1_'] = Tools::getValue('_MEDIA_SERVER_1_');
$base_urls['_MEDIA_SERVER_2_'] = Tools::getValue('_MEDIA_SERVER_2_');
$base_urls['_MEDIA_SERVER_3_'] = Tools::getValue('_MEDIA_SERVER_3_');
if ($base_urls['_MEDIA_SERVER_1_'] || $base_urls['_MEDIA_SERVER_2_'] || $base_urls['_MEDIA_SERVER_3_'])
Configuration::updateValue('PS_MEDIA_SERVERS', 1);
else
Configuration::updateValue('PS_MEDIA_SERVERS', 0);
rewriteSettingsFile($base_urls, null, null);
Tools::generateHtaccess(null, null, null, '', null, array($base_urls['_MEDIA_SERVER_1_'], $base_urls['_MEDIA_SERVER_2_'], $base_urls['_MEDIA_SERVER_3_']));
unset($this->_fieldsGeneral['_MEDIA_SERVER_1_']);