Disable peristent cache when safe_mode.

git-svn-id: https://develop.svn.wordpress.org/trunk@3436 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-01-14 21:22:48 +00:00
parent 79da568b81
commit 0d0a6b876d
1 changed files with 6 additions and 1 deletions

View File

@ -396,6 +396,10 @@ class WP_Object_Cache {
if (defined('DISABLE_CACHE'))
return;
// Disable the persistent cache if safe_mode is on.
if ( ini_get('safe_mode') )
return;
if (defined('CACHE_PATH'))
$this->cache_dir = CACHE_PATH;
else
@ -403,10 +407,11 @@ class WP_Object_Cache {
if (is_writable($this->cache_dir) && is_dir($this->cache_dir)) {
$this->cache_enabled = true;
} else
} else {
if (is_writable(ABSPATH.'wp-content')) {
$this->cache_enabled = true;
}
}
if (defined('CACHE_EXPIRATION_TIME'))
$this->expiration_time = CACHE_EXPIRATION_TIME;