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; } }