mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-19 15:01:33 +02:00
[ticket/15311] Use storage in backups
PHPBB3-15311
This commit is contained in:
@@ -21,10 +21,6 @@ use phpbb\db\extractor\exception\extractor_not_initialized_exception;
|
||||
*/
|
||||
abstract class base_extractor implements extractor_interface
|
||||
{
|
||||
/**
|
||||
* @var string phpBB root path
|
||||
*/
|
||||
protected $phpbb_root_path;
|
||||
|
||||
/**
|
||||
* @var \phpbb\request\request_interface
|
||||
@@ -84,13 +80,11 @@ abstract class base_extractor implements extractor_interface
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $phpbb_root_path
|
||||
* @param \phpbb\request\request_interface $request
|
||||
* @param \phpbb\db\driver\driver_interface $db
|
||||
*/
|
||||
public function __construct($phpbb_root_path, \phpbb\request\request_interface $request, \phpbb\db\driver\driver_interface $db)
|
||||
public function __construct(\phpbb\request\request_interface $request, \phpbb\db\driver\driver_interface $db)
|
||||
{
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->request = $request;
|
||||
$this->db = $db;
|
||||
$this->fp = null;
|
||||
@@ -164,13 +158,13 @@ abstract class base_extractor implements extractor_interface
|
||||
|
||||
if ($store === true)
|
||||
{
|
||||
$file = $this->phpbb_root_path . 'store/' . $filename . $ext;
|
||||
$file = sys_get_temp_dir() . '/' . $filename . $ext;
|
||||
|
||||
$this->fp = $open($file, 'w');
|
||||
|
||||
if (!$this->fp)
|
||||
{
|
||||
trigger_error('FILE_WRITE_FAIL', E_USER_ERROR);
|
||||
throw new \phpbb\exception\runtime_exception('FILE_WRITE_FAIL');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user