1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[ticket/14555] Uniformize cache directory usages

PHPBB3-14555
This commit is contained in:
Tristan Darricau
2016-03-23 22:48:58 +01:00
parent eca4726f3c
commit 56c2caf6c0
18 changed files with 43 additions and 48 deletions

View File

@@ -32,9 +32,9 @@ class file extends \phpbb\cache\driver\base
*/
function __construct($cache_dir = null)
{
global $phpbb_root_path, $phpbb_container;
global $phpbb_container;
$this->cache_dir = !is_null($cache_dir) ? $cache_dir : $phpbb_root_path . 'cache/' . $phpbb_container->getParameter('core.environment') . '/';
$this->cache_dir = !is_null($cache_dir) ? $cache_dir : $phpbb_container->getParameter('core.cache_dir');
$this->filesystem = new \phpbb\filesystem\filesystem();
if (!is_dir($this->cache_dir))

View File

@@ -25,9 +25,9 @@ abstract class memory extends \phpbb\cache\driver\base
*/
function __construct()
{
global $phpbb_root_path, $dbname, $table_prefix;
global $phpbb_root_path, $dbname, $table_prefix, $phpbb_container;
$this->cache_dir = $phpbb_root_path . 'cache/';
$this->cache_dir = $phpbb_container->getParameter('core.cache_dir');
$this->key_prefix = substr(md5($dbname . $table_prefix), 0, 8) . '_';
if (!isset($this->extension) || !extension_loaded($this->extension))