[-] FO: Fix dispatcher which not allow underscores on rewrited urls

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16349 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2012-07-11 15:09:51 +00:00
parent 040ff69c10
commit 2eaea9cb80

View File

@@ -51,15 +51,15 @@ class DispatcherCore
'rule' => '{category:/}{id}-{rewrite}{-:ean13}.html',
'keywords' => array(
'id' => array('regexp' => '[0-9]+', 'param' => 'id_product'),
'rewrite' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'ean13' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'category' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'categories' => array('regexp' => '[/a-zA-Z0-9-\pL]*'),
'reference' => 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]*'),
'manufacturer' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'supplier' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'ean13' => array('regexp' => '[0-9\pL]*'),
'category' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'categories' => array('regexp' => '[/_a-zA-Z0-9-\pL]*'),
'reference' => 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]*'),
'manufacturer' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'supplier' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),
'price' => array('regexp' => '[0-9\.,]*'),
'tags' => array('regexp' => '[a-zA-Z0-9-\pL]*'),
),
@@ -71,9 +71,9 @@ class DispatcherCore
'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]*'),
'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(
@@ -81,9 +81,9 @@ class DispatcherCore
'rule' => '{id}-{rewrite}',
'keywords' => array(
'id' => array('regexp' => '[0-9]+', 'param' => 'id_category'),
'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]*'),
'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]*'),
),
),
'supplier_rule' => array(
@@ -91,9 +91,9 @@ class DispatcherCore
'rule' => '{id}__{rewrite}',
'keywords' => array(
'id' => array('regexp' => '[0-9]+', 'param' => 'id_supplier'),
'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]*'),
'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]*'),
),
),
'manufacturer_rule' => array(
@@ -101,9 +101,9 @@ class DispatcherCore
'rule' => '{id}_{rewrite}',
'keywords' => array(
'id' => array('regexp' => '[0-9]+', 'param' => 'id_manufacturer'),
'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]*'),
'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]*'),
),
),
'cms_rule' => array(
@@ -111,9 +111,9 @@ class DispatcherCore
'rule' => 'content/{id}-{rewrite}',
'keywords' => array(
'id' => array('regexp' => '[0-9]+', 'param' => 'id_cms'),
'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]*'),
'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]*'),
),
),
'cms_category_rule' => array(
@@ -121,17 +121,17 @@ class DispatcherCore
'rule' => 'content/category/{id}-{rewrite}',
'keywords' => array(
'id' => array('regexp' => '[0-9]+', 'param' => 'id_cms_category'),
'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]*'),
'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]*'),
),
),
'module' => array(
'controller' => null,
'rule' => 'module/{module}{/:controller}',
'keywords' => array(
'module' => array('regexp' => '[a-zA-Z0-9_-]+', 'param' => 'module'),
'controller' => array('regexp' => '[a-zA-Z0-9_-]+', 'param' => 'controller'),
'module' => array('regexp' => '[_a-zA-Z0-9_-]+', 'param' => 'module'),
'controller' => array('regexp' => '[_a-zA-Z0-9_-]+', 'param' => 'controller'),
),
'params' => array(
'fc' => 'module',