[+] BO : Module controllers can now create custom rewrite in SEO page

This commit is contained in:
rMalie
2012-04-27 13:36:31 +00:00
parent 2841323568
commit 59a568c069
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;