[+] BO : Module controllers can now create custom rewrite in SEO page
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14950 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -444,6 +444,17 @@ class DispatcherCore
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a route exists
|
||||
*
|
||||
* @param string $route_id
|
||||
* @return bool
|
||||
*/
|
||||
public function hasRoute($route_id)
|
||||
{
|
||||
return isset($this->routes[$route_id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a keyword is written in a route rule
|
||||
*
|
||||
@@ -597,6 +608,14 @@ class DispatcherCore
|
||||
foreach ($route['params'] as $k => $v)
|
||||
$_GET[$k] = $v;
|
||||
|
||||
// A patch for module friendly urls
|
||||
if (preg_match('#module-([a-z0-9_-]+)-([a-z0-9]+)$#i', $controller, $m))
|
||||
{
|
||||
$_GET['module'] = $m[1];
|
||||
$_GET['fc'] = 'module';
|
||||
$controller = $m[2];
|
||||
}
|
||||
|
||||
if (isset($_GET['fc']) && $_GET['fc'] == 'module')
|
||||
$this->front_controller = self::FC_MODULE;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user