From a55aa374c7e6770636f8af2f9c38738a1aa4bc98 Mon Sep 17 00:00:00 2001 From: phpnut Date: Sun, 16 Sep 2007 21:10:05 +0000 Subject: [PATCH] Fixes #3244,loadControllers() does not work git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5663 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/basics.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cake/basics.php b/cake/basics.php index a57589d5d..b43538564 100644 --- a/cake/basics.php +++ b/cake/basics.php @@ -314,8 +314,9 @@ foreach ($paths->controllerPaths as $path) { foreach (listClasses($path) as $controller) { list($name) = explode('.', $controller); - $className = Inflector::camelize($name); - if (loadController($name)) { + $className = Inflector::camelize(str_replace('_controller', '', $name)); + + if (loadController($className)) { $loadedControllers[$controller] = $className; } }