From ac552a256e7933e78cdeb67f9eecf34e4379389d Mon Sep 17 00:00:00 2001 From: phpnut Date: Wed, 22 Nov 2006 21:32:59 +0000 Subject: [PATCH] Merging fix from [3912] git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3913 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/basics.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cake/basics.php b/cake/basics.php index 2ecbabc6a..ac136244f 100644 --- a/cake/basics.php +++ b/cake/basics.php @@ -62,11 +62,13 @@ } Overloadable::overload('AppModel'); } - $loadedModels = array(); foreach($path->modelPaths as $path) { foreach(listClasses($path)as $model_fn) { - if (!key_exists($model_fn, $loadedModels)) { + list($name) = explode('.', $model_fn); + $className = Inflector::camelize($name); + + if (!class_exists($className)) { require($path . $model_fn); list($name) = explode('.', $model_fn); Overloadable::overload(Inflector::camelize($name));