Navigation Menu

Skip to content

Commit

Permalink
updating some code related to Configure/App changes. Fixing issue whe…
Browse files Browse the repository at this point in the history
…n cache is not configured
  • Loading branch information
gwoo committed Jul 22, 2009
1 parent 8dc777a commit f295a21
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/webroot/test.php
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions cake/console/cake.php
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion cake/console/libs/templates/skel/webroot/test.php
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion cake/console/libs/testsuite.php
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion cake/libs/cache.php
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions cake/libs/configure.php
Expand Up @@ -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
)));
Expand Down
2 changes: 1 addition & 1 deletion cake/libs/debugger.php
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/lib/cake_test_case.php
Expand Up @@ -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) {
Expand Down

0 comments on commit f295a21

Please sign in to comment.