Moving plugin route loading to app/Config/routes.php

Its old position would end up with plugin routes being loaded
after the core fallback routes.
This commit is contained in:
Mark Story 2011-07-18 21:30:18 -04:00 committed by mark_story
parent c37c641b4a
commit c8647b227a
2 changed files with 8 additions and 2 deletions

View file

@ -32,6 +32,13 @@
Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display')); Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
/** /**
* Load the CakePHP default routes. * Load all plugin routes. See the CakePlugin documentation on
* how to customize the loading of plugin routes.
*/
CakePlugin::routes();
/**
* Load the CakePHP default routes. Remove this if you do not want to use
* the built-in default routes.
*/ */
require CAKE . 'Config' . DS . 'routes.php'; require CAKE . 'Config' . DS . 'routes.php';

View file

@ -204,7 +204,6 @@ class Dispatcher {
*/ */
protected function _loadRoutes() { protected function _loadRoutes() {
include APP . 'Config' . DS . 'routes.php'; include APP . 'Config' . DS . 'routes.php';
CakePlugin::routes();
} }
/** /**