"Adding vendors path to corePaths to be used when cake core is placed outside of normal install paths"

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6560 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2008-03-11 23:53:37 +00:00
parent 7a769f68ca
commit 12acf6ab9f

View file

@ -499,6 +499,9 @@ class Configure extends Object {
$paths['cake'][] = $path . DS . 'cake' . DS;
$paths['class'][] = $path . DS . 'cake' . DS;
}
if (is_dir($path . DS . 'vendors')) {
$paths['vendor'][] = $path . DS . 'vendors' . DS;
}
$used[] = $path;
}
Cache::write('core_paths', array_filter($paths), '_cake_core_');
@ -596,9 +599,11 @@ class Configure extends Object {
$_this->{$pathsVar} = $default;
if (isset($paths[$pathsVar]) && !empty($paths[$pathsVar])) {
$_this->{$pathsVar} = array_merge($_this->{$pathsVar}, (array)$paths[$pathsVar], $merge);
$path = array_flip(array_flip((array_merge($_this->{$pathsVar}, (array)$paths[$pathsVar], $merge))));
$_this->{$pathsVar} = $path;
} else {
$_this->{$pathsVar} = array_merge($_this->{$pathsVar}, $merge);
$path = array_flip(array_flip((array_merge($_this->{$pathsVar}, $merge))));
$_this->{$pathsVar} = $path;
}
}
}