Skip to content
Permalink
Browse files

updating some code related to Configure/App changes. Fixing issue whe…

…n cache is not configured
  • Loading branch information...
gwoo
gwoo committed Jul 22, 2009
1 parent 8dc777a commit f295a21831da73d9e4722654fc20ca32a500b661
@@ -86,7 +86,7 @@
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
}
$corePath = Configure::corePaths('cake');
$corePath = App::core('cake');
if (isset($corePath[0])) {
define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS);
} else {
@@ -259,8 +259,8 @@ function __bootstrap() {
Configure::getInstance(file_exists(CONFIGS . 'bootstrap.php'));
if (!file_exists(APP_PATH . 'config' . DS . 'core.php')) {
include_once CORE_PATH . 'cake' . DS . 'console' . DS . 'templates' . DS . 'skel' . DS . 'config' . DS . 'core.php';
Configure::buildPaths(array());
include_once CORE_PATH . 'cake' . DS . 'console' . DS . 'libs' . DS . 'templates' . DS . 'skel' . DS . 'config' . DS . 'core.php';
App::build();
}
Configure::write('debug', 1);
@@ -86,7 +86,7 @@
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
}
$corePath = Configure::corePaths('cake');
$corePath = App::core('cake');
if (isset($corePath[0])) {
define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS);
} else {
@@ -81,7 +81,7 @@ class TestSuiteShell extends Shell {
* @access public
*/
function initialize() {
$corePath = Configure::corePaths('cake');
$corePath = App::core('cake');
if (isset($corePath[0])) {
define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS);
} else {
@@ -192,7 +192,7 @@ function set($settings = array(), $value = null) {
}
$settings = array_merge($_this->__config[$_this->__name], $settings);
}
$_this->_Engine[$engine]->init($settings);
$_this->engine($engine, $settings);
}
return $_this->settings($engine);
@@ -412,16 +412,16 @@ function __loadBootstrap($boot) {
} else {
$duration = '+999 days';
}
if (Cache::config('_cake_core_') === false) {
Cache::config('_cake_core_', array_merge($cache['settings'], array(
Cache::config('_cake_core_', array_merge((array)$cache['settings'], array(
'prefix' => $prefix . 'cake_core_', 'path' => $path . DS . 'persistent' . DS,
'serialize' => true, 'duration' => $duration
)));
}
if (Cache::config('_cake_model_') === false) {
Cache::config('_cake_model_', array_merge($cache['settings'], array(
Cache::config('_cake_model_', array_merge((array)$cache['settings'], array(
'prefix' => $prefix . 'cake_model_', 'path' => $path . DS . 'models' . DS,
'serialize' => true, 'duration' => $duration
)));
@@ -425,7 +425,7 @@ function trimPath($path) {
} elseif (strpos($path, ROOT) === 0) {
return str_replace(ROOT, 'ROOT', $path);
}
$corePaths = Configure::corePaths('cake');
$corePaths = App::core('cake');
foreach ($corePaths as $corePath) {
if (strpos($path, $corePath) === 0) {
return str_replace($corePath, 'CORE' .DS . 'cake' .DS, $path);
@@ -726,7 +726,7 @@ function _loadFixtures() {
if (strpos($fixture, 'core.') === 0) {
$fixture = substr($fixture, strlen('core.'));
foreach (Configure::corePaths('cake') as $key => $path) {
foreach (App::core('cake') as $key => $path) {
$fixturePaths[] = $path . 'tests' . DS . 'fixtures';
}
} elseif (strpos($fixture, 'app.') === 0) {

0 comments on commit f295a21

Please sign in to comment.
You can’t perform that action at this time.