1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/15287] Update storage

PHPBB3-15287
This commit is contained in:
Rubén Calvo
2017-07-19 14:26:07 +02:00
parent 51d42b2ced
commit af21b8b6c1
6 changed files with 126 additions and 5 deletions

View File

@@ -15,7 +15,6 @@ namespace phpbb\storage\adapter;
use phpbb\storage\exception\exception;
use phpbb\filesystem\exception\filesystem_exception;
use phpbb\config\config;
use phpbb\filesystem\filesystem;
/**
@@ -30,16 +29,27 @@ class local implements adapter_interface
*/
protected $filesystem;
/** @var string path */
protected $phpbb_root_path;
/** @var string path */
protected $root_path;
/**
* Constructor
*/
public function __construct(config $config, filesystem $filesystem, $phpbb_root_path, $path_key)
public function __construct(filesystem $filesystem, $phpbb_root_path)
{
$this->filesystem = $filesystem;
$this->root_path = $phpbb_root_path . $config[$path_key];
$this->phpbb_root_path = $phpbb_root_path;
}
/**
* {@inheritdoc}
*/
public function configure($options)
{
$this->root_path = $this->phpbb_root_path . $options['path'];
if (substr($this->root_path, -1, 1) != DIRECTORY_SEPARATOR)
{