"Closes #4305, fixed to allow cake core outside of normal install locations"

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6555 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2008-03-10 16:46:33 +00:00
parent 57918f4199
commit 9ae17c25e5

View file

@ -458,13 +458,15 @@ class Configure extends Object {
function corePaths($type = null) {
$paths = Cache::read('core_paths', '_cake_core_');
if (!$paths) {
$all = explode(PATH_SEPARATOR, ini_get('include_path'));
$all = array_flip(array_flip((array_merge(array(CAKE_CORE_INCLUDE_PATH), $all))));
$used = array();
$openBasedir = ini_get('open_basedir');
if ($openBasedir) {
$all = explode(PATH_SEPARATOR, $openBasedir);
$all = array_flip(array_flip((array_merge(array(CAKE_CORE_INCLUDE_PATH), $all))));
} else {
$all = explode(PATH_SEPARATOR, ini_get('include_path'));
$all = array_flip(array_flip((array_merge(array(CAKE_CORE_INCLUDE_PATH), $all))));
}
foreach ($all as $path) {