aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/cache/driver/file.php
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-09-29 16:06:56 +0200
committerTristan Darricau <github@nicofuma.fr>2014-11-20 20:59:34 +0100
commitaa061aa7c9187009f220e62252a53b49dad7644a (patch)
tree106e4175c29f9eb5e0f4c91bcd200a1825f5cd64 /phpBB/phpbb/cache/driver/file.php
parent998b4baa7197db8ac163cfbab97e1cd2eac761dc (diff)
downloadforums-aa061aa7c9187009f220e62252a53b49dad7644a.tar
forums-aa061aa7c9187009f220e62252a53b49dad7644a.tar.gz
forums-aa061aa7c9187009f220e62252a53b49dad7644a.tar.bz2
forums-aa061aa7c9187009f220e62252a53b49dad7644a.tar.xz
forums-aa061aa7c9187009f220e62252a53b49dad7644a.zip
[ticket/12620] Uses a cache directory per environment
PHPBB3-12620
Diffstat (limited to 'phpBB/phpbb/cache/driver/file.php')
-rw-r--r--phpBB/phpbb/cache/driver/file.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php
index adfe87b740..d3708fe9a0 100644
--- a/phpBB/phpbb/cache/driver/file.php
+++ b/phpBB/phpbb/cache/driver/file.php
@@ -28,7 +28,12 @@ class file extends \phpbb\cache\driver\base
function __construct($cache_dir = null)
{
global $phpbb_root_path;
- $this->cache_dir = !is_null($cache_dir) ? $cache_dir : $phpbb_root_path . 'cache/';
+ $this->cache_dir = !is_null($cache_dir) ? $cache_dir : $phpbb_root_path . 'cache/' . PHPBB_ENVIRONMENT . '/';
+
+ if (!is_dir($this->cache_dir))
+ {
+ @mkdir($this->cache_dir, 0777, true);
+ }
}
/**