Modules: Don't call `FrontController::getRoute()' twice

refs #6303
This commit is contained in:
Eric Lippmann 2014-05-26 13:08:47 +02:00
parent ce220c5ea7
commit 6ff5a986dd

View File

@ -600,18 +600,19 @@ class Module
*/ */
protected function registerRoutes() protected function registerRoutes()
{ {
$this->app->getFrontController()->getRouter()->addRoute( $router = $this->app->getFrontController()->getRouter();
$router->addRoute(
$this->name . '_jsprovider', $this->name . '_jsprovider',
new Route( new Route(
'js/' . $this->name . '/:file', 'js/' . $this->name . '/:file',
array( array(
'controller' => 'static', 'controller' => 'static',
'action' =>'javascript', 'action' =>'javascript',
'module_name' => $this->name 'module_name' => $this->name
) )
) )
); );
$this->app->getFrontController()->getRouter()->addRoute( $router->addRoute(
$this->name . '_img', $this->name . '_img',
new Route( new Route(
'img/' . $this->name . '/:file', 'img/' . $this->name . '/:file',