mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
"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:
parent
7a769f68ca
commit
12acf6ab9f
1 changed files with 7 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue