"Correcting path searches for base Classes"

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6004 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-11-16 18:04:02 +00:00
parent 87d7124978
commit c1533a6aa6

View file

@ -660,7 +660,6 @@ class App extends Object {
if (is_array($parent)) {
extract($parent, EXTR_OVERWRITE);
die(debug($this));
}
if ($name === null && $file === null) {
@ -889,13 +888,10 @@ class App extends Object {
*/
function __settings($type, $plugin, $parent) {
$_this = & App::getInstance();
if (empty($parent)) {
return null;
}
if ($parent !== true) {
$_this->import($_this->parent, $type, false);
if (!$parent) {
return null;
}
if ($plugin) {
$plugin = Inflector::underscore($plugin);
$name = Inflector::camelize($plugin);
@ -907,7 +903,7 @@ class App extends Object {
if (!class_exists('Model')) {
$_this->import('Core', 'Model', false);
}
$_this->import($type, 'AppModel', false);
$_this->import($type, 'AppModel', false, Configure::read('modelPaths'));
if ($plugin) {
$_this->import($type, $plugin . '.' . $name . 'AppModel', false, array(), $plugin . DS . $plugin . '_app_model.php');
}