diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-01-02 17:10:03 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-01-02 17:10:03 +0000 |
| commit | 4a7ec3a72a69e8f66dce65590900d59978798384 (patch) | |
| tree | 23037940fad9aa64644958ac91e7fdadf8cd0f5d /wp-inst/wp-includes/cache.php | |
| parent | ed4930953197324008fe13ae2eee874bbcbc48fd (diff) | |
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@489 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-includes/cache.php')
| -rw-r--r-- | wp-inst/wp-includes/cache.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/wp-inst/wp-includes/cache.php b/wp-inst/wp-includes/cache.php index ffb6756..af932a7 100644 --- a/wp-inst/wp-includes/cache.php +++ b/wp-inst/wp-includes/cache.php @@ -53,7 +53,7 @@ define('CACHE_SERIAL_FOOTER', "\n?".">"); class WP_Object_Cache { var $cache_dir; var $cache_enabled = false; - var $expiration_time = 86400; + var $expiration_time = 900; var $flock_filename = 'wp_object_cache.lock'; var $cache = array (); var $dirty_objects = array (); @@ -205,7 +205,9 @@ class WP_Object_Cache { } if (!file_exists($this->cache_dir.$make_dir."index.php")) { + $file_perms = $perms & 0000666; @ touch($this->cache_dir.$make_dir."index.php"); + @ chmod($this->cache_dir.$make_dir."index.php", $file_perms); } } @@ -268,7 +270,8 @@ class WP_Object_Cache { // Give the new dirs the same perms as wp-content. $stat = stat(ABSPATH.'wp-content'); - $dir_perms = $stat['mode'] & 0000777; // Get the permission bits. + $dir_perms = $stat['mode'] & 0007777; // Get the permission bits. + $file_perms = $dir_perms & 0000666; // Remove execute bits for files. // Make the base cache dir. if (!file_exists($this->cache_dir)) { @@ -279,6 +282,7 @@ class WP_Object_Cache { if (!file_exists($this->cache_dir."index.php")) { @ touch($this->cache_dir."index.php"); + @ chmod($this->cache_dir."index.php", $file_perms); } // Acquire a write lock. @@ -314,6 +318,7 @@ class WP_Object_Cache { @ unlink($temp_file); } } + @ chmod($cache_file, $file_perms); } } |
