From eb1ee665f65e4662108f1334811f6ab8dc8e5b7a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20S=CC=8Ckoda?= Date: Mon, 15 Jul 2013 08:04:11 +0200 Subject: [PATCH] MDL-40642 use this->cfg in local file store when fixing permissions --- cache/stores/file/lib.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cache/stores/file/lib.php b/cache/stores/file/lib.php index 6e1734cb25f..96d11b29ed6 100644 --- a/cache/stores/file/lib.php +++ b/cache/stores/file/lib.php @@ -689,8 +689,6 @@ class cachestore_file extends cache_store implements cache_is_key_aware, cache_i * @return bool */ protected function write_file($file, $content) { - global $CFG; - // Generate a temp file that is going to be unique. We'll rename it at the end to the desired file name. // in this way we avoid partial writes. $path = dirname($file); @@ -722,7 +720,7 @@ class cachestore_file extends cache_store implements cache_is_key_aware, cache_i // Finally rename the temp file to the desired file, returning the true|false result. $result = rename($tempfile, $file); - @chmod($file, $CFG->filepermissions); + @chmod($file, $this->cfg->filepermissions); if (!$result) { // Failed to rename, don't leave files lying around. @unlink($tempfile); -- 2.11.4.GIT