[+] 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:
rMalie
2012-04-27 13:36:31 +00:00
parent 6e8d4f587e
commit 3a46ce1a35
4 changed files with 68 additions and 10 deletions
+19
View File
@@ -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;