1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +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

@@ -20,20 +20,23 @@ class queue extends \phpbb\cron\task\base
{
protected $phpbb_root_path;
protected $php_ext;
protected $cache_dir;
protected $config;
/**
* Constructor.
*
* @param string $phpbb_root_path The root path
* @param string $php_ext PHP file extension
* @param \phpbb\config\config $config The config
*/
public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config)
* Constructor.
*
* @param string $phpbb_root_path The root path
* @param string $php_ext PHP file extension
* @param \phpbb\config\config $config The config
* @param string $cache_dir phpBB cache directory
*/
public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config, $cache_dir)
{
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
$this->config = $config;
$this->cache_dir = $cache_dir;
}
/**
@@ -60,7 +63,7 @@ class queue extends \phpbb\cron\task\base
*/
public function is_runnable()
{
return file_exists($this->phpbb_root_path . 'cache/queue.' . $this->php_ext);
return file_exists($this->cache_dir . 'queue.' . $this->php_ext);
}
/**