Fixing return value of loadModels()

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4314 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-01-22 08:10:43 +00:00
parent 51d384932f
commit 181a22d659

View file

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