mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/15311] Change service and method name
PHPBB3-15311
This commit is contained in:
parent
b43268e8fc
commit
3320ffb399
10 changed files with 19 additions and 19 deletions
|
@ -36,5 +36,5 @@ services:
|
||||||
- '@dispatcher'
|
- '@dispatcher'
|
||||||
- '@plupload'
|
- '@plupload'
|
||||||
- '@storage.attachment'
|
- '@storage.attachment'
|
||||||
- '@temp'
|
- '@filesystem.temp'
|
||||||
- '@user'
|
- '@user'
|
||||||
|
|
|
@ -34,7 +34,7 @@ services:
|
||||||
class: phpbb\db\extractor\mssql_extractor
|
class: phpbb\db\extractor\mssql_extractor
|
||||||
shared: false
|
shared: false
|
||||||
arguments:
|
arguments:
|
||||||
- '@temp'
|
- '@filesystem.temp'
|
||||||
- '@request'
|
- '@request'
|
||||||
- '@dbal.conn.driver'
|
- '@dbal.conn.driver'
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ services:
|
||||||
class: phpbb\db\extractor\mysql_extractor
|
class: phpbb\db\extractor\mysql_extractor
|
||||||
shared: false
|
shared: false
|
||||||
arguments:
|
arguments:
|
||||||
- '@temp'
|
- '@filesystem.temp'
|
||||||
- '@request'
|
- '@request'
|
||||||
- '@dbal.conn.driver'
|
- '@dbal.conn.driver'
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ services:
|
||||||
class: phpbb\db\extractor\oracle_extractor
|
class: phpbb\db\extractor\oracle_extractor
|
||||||
shared: false
|
shared: false
|
||||||
arguments:
|
arguments:
|
||||||
- '@temp'
|
- '@filesystem.temp'
|
||||||
- '@request'
|
- '@request'
|
||||||
- '@dbal.conn.driver'
|
- '@dbal.conn.driver'
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ services:
|
||||||
class: phpbb\db\extractor\postgres_extractor
|
class: phpbb\db\extractor\postgres_extractor
|
||||||
shared: false
|
shared: false
|
||||||
arguments:
|
arguments:
|
||||||
- '@temp'
|
- '@filesystem.temp'
|
||||||
- '@request'
|
- '@request'
|
||||||
- '@dbal.conn.driver'
|
- '@dbal.conn.driver'
|
||||||
|
|
||||||
|
@ -66,6 +66,6 @@ services:
|
||||||
class: phpbb\db\extractor\sqlite3_extractor
|
class: phpbb\db\extractor\sqlite3_extractor
|
||||||
shared: false
|
shared: false
|
||||||
arguments:
|
arguments:
|
||||||
- '@temp'
|
- '@filesystem.temp'
|
||||||
- '@request'
|
- '@request'
|
||||||
- '@dbal.conn.driver'
|
- '@dbal.conn.driver'
|
||||||
|
|
|
@ -71,7 +71,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- '@config'
|
- '@config'
|
||||||
- '@files.factory'
|
- '@files.factory'
|
||||||
- '@temp'
|
- '@filesystem.temp'
|
||||||
- '@language'
|
- '@language'
|
||||||
- '@php_ini'
|
- '@php_ini'
|
||||||
- '@request'
|
- '@request'
|
||||||
|
@ -82,7 +82,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- '@config'
|
- '@config'
|
||||||
- '@files.factory'
|
- '@files.factory'
|
||||||
- '@temp'
|
- '@filesystem.temp'
|
||||||
- '@language'
|
- '@language'
|
||||||
- '@php_ini'
|
- '@php_ini'
|
||||||
- '@request'
|
- '@request'
|
||||||
|
|
|
@ -5,7 +5,7 @@ services:
|
||||||
filesystem:
|
filesystem:
|
||||||
class: phpbb\filesystem\filesystem
|
class: phpbb\filesystem\filesystem
|
||||||
|
|
||||||
temp:
|
filesystem.temp:
|
||||||
class: phpbb\filesystem\temp
|
class: phpbb\filesystem\temp
|
||||||
arguments:
|
arguments:
|
||||||
- '@filesystem'
|
- '@filesystem'
|
||||||
|
|
|
@ -22,7 +22,7 @@ if (!defined('IN_PHPBB'))
|
||||||
class acp_database
|
class acp_database
|
||||||
{
|
{
|
||||||
protected $db_tools;
|
protected $db_tools;
|
||||||
protected $filesystem;
|
protected $temp;
|
||||||
public $u_action;
|
public $u_action;
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
|
@ -31,7 +31,7 @@ class acp_database
|
||||||
global $phpbb_root_path, $phpbb_container, $phpbb_log, $table_prefix;
|
global $phpbb_root_path, $phpbb_container, $phpbb_log, $table_prefix;
|
||||||
|
|
||||||
$this->db_tools = $phpbb_container->get('dbal.tools');
|
$this->db_tools = $phpbb_container->get('dbal.tools');
|
||||||
$this->filesystem = $phpbb_container->get('filesystem');
|
$this->temp = $phpbb_container->get('filesystem.temp');
|
||||||
$storage = $phpbb_container->get('storage.backup');
|
$storage = $phpbb_container->get('storage.backup');
|
||||||
|
|
||||||
$user->add_lang('acp/database');
|
$user->add_lang('acp/database');
|
||||||
|
@ -176,7 +176,7 @@ class acp_database
|
||||||
$file = $filename . $ext;
|
$file = $filename . $ext;
|
||||||
|
|
||||||
// Copy to storage using streams
|
// Copy to storage using streams
|
||||||
$temp_dir = $this->filesystem->get_temp_dir();
|
$temp_dir = $this->temp->get_dir();
|
||||||
|
|
||||||
$fp = fopen($temp_dir . '/' . $file, 'rb');
|
$fp = fopen($temp_dir . '/' . $file, 'rb');
|
||||||
|
|
||||||
|
@ -349,7 +349,7 @@ class acp_database
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy file to temp folder to decompress it
|
// Copy file to temp folder to decompress it
|
||||||
$temp_file_name = $this->filesystem->get_temp_dir() . '/' . $file_name;
|
$temp_file_name = $this->temp->get_dir() . '/' . $file_name;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -240,7 +240,7 @@ class upload
|
||||||
{
|
{
|
||||||
$source = $this->file->get('filename');
|
$source = $this->file->get('filename');
|
||||||
$destination_name = 'thumb_' . $this->file->get('realname');
|
$destination_name = 'thumb_' . $this->file->get('realname');
|
||||||
$destination = $this->temp->get_temp_dir() . '/' . $destination_name;
|
$destination = $this->temp->get_dir() . '/' . $destination_name;
|
||||||
|
|
||||||
if (create_thumbnail($source, $destination, $this->file->get('mimetype')))
|
if (create_thumbnail($source, $destination, $this->file->get('mimetype')))
|
||||||
{
|
{
|
||||||
|
|
|
@ -164,7 +164,7 @@ abstract class base_extractor implements extractor_interface
|
||||||
|
|
||||||
if ($store === true)
|
if ($store === true)
|
||||||
{
|
{
|
||||||
$file = $this->temp->get_temp_dir() . '/' . $filename . $ext;
|
$file = $this->temp->get_dir() . '/' . $filename . $ext;
|
||||||
|
|
||||||
$this->fp = $open($file, 'w');
|
$this->fp = $open($file, 'w');
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ class remote extends base
|
||||||
|
|
||||||
$data = $response->getBody();
|
$data = $response->getBody();
|
||||||
|
|
||||||
$filename = tempnam($this->temp->get_temp_dir(), unique_id() . '-');
|
$filename = tempnam($this->temp->get_dir(), unique_id() . '-');
|
||||||
|
|
||||||
if (!($fp = @fopen($filename, 'wb')))
|
if (!($fp = @fopen($filename, 'wb')))
|
||||||
{
|
{
|
||||||
|
|
|
@ -145,7 +145,7 @@ class remote_storage extends base
|
||||||
|
|
||||||
$data = $response->getBody();
|
$data = $response->getBody();
|
||||||
|
|
||||||
$filename = tempnam($this->temp->get_temp_dir(), unique_id() . '-');
|
$filename = tempnam($this->temp->get_dir(), unique_id() . '-');
|
||||||
|
|
||||||
if (!($fp = @fopen($filename, 'wb')))
|
if (!($fp = @fopen($filename, 'wb')))
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace phpbb\filesystem;
|
||||||
class temp
|
class temp
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string Temporary directory path
|
||||||
*/
|
*/
|
||||||
protected $temp_dir;
|
protected $temp_dir;
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class temp
|
||||||
*
|
*
|
||||||
* @return string returns the directory
|
* @return string returns the directory
|
||||||
*/
|
*/
|
||||||
public function get_temp_dir()
|
public function get_dir()
|
||||||
{
|
{
|
||||||
return $this->temp_dir;
|
return $this->temp_dir;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue