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