Browse Source

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.

Mark Story 14 years ago
parent
commit
c8647b227a
2 changed files with 8 additions and 2 deletions
  1. 8 1
      app/Config/routes.php
  2. 0 1
      lib/Cake/Routing/Dispatcher.php

+ 8 - 1
app/Config/routes.php

@@ -32,6 +32,13 @@
 	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';

+ 0 - 1
lib/Cake/Routing/Dispatcher.php

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