// Allow to force routes #PSCFV-2592

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15711 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-05-28 13:41:00 +00:00
parent 2c3b45ff44
commit cc179c3a49
4 changed files with 46 additions and 12 deletions
+2 -2
View File
@@ -519,7 +519,7 @@ class DispatcherCore
* @param bool $use_routes If false, don't use to create this url
* @param string $anchor Optional anchor to add at the end of this url
*/
public function createUrl($route_id, array $params = array(), $use_routes = true, $anchor = '')
public function createUrl($route_id, array $params = array(), $force_routes = false, $anchor = '')
{
if (!isset($this->routes[$route_id]))
{
@@ -541,7 +541,7 @@ class DispatcherCore
}
// Build an url which match a route
if ($this->use_routes && $use_routes)
if ($this->use_routes || $force_routes)
{
$url = $route['rule'];
$add_param = array();