From 181a22d659223ac6cd1771d3f075c69722330866 Mon Sep 17 00:00:00 2001 From: nate Date: Mon, 22 Jan 2007 08:10:43 +0000 Subject: [PATCH] Fixing return value of loadModels() git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4314 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 f65477779..14a59cd95 100644 --- a/cake/basics.php +++ b/cake/basics.php @@ -62,17 +62,18 @@ } Overloadable::overload('AppModel'); } + $loadedModels = array(); foreach($path->modelPaths as $path) { - foreach(listClasses($path)as $model_fn) { + foreach(listClasses($path) as $model_fn) { list($name) = explode('.', $model_fn); $className = Inflector::camelize($name); + $loadedModels[$model_fn] = $model_fn; if (!class_exists($className)) { require($path . $model_fn); list($name) = explode('.', $model_fn); Overloadable::overload(Inflector::camelize($name)); - $loadedModels[$model_fn] = $model_fn; } } }