mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/13904] Get rid of useless parameters and variables
PHPBB3-13904
This commit is contained in:
parent
186b4495b6
commit
a96e7a8ec6
3 changed files with 6 additions and 9 deletions
|
@ -410,7 +410,6 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
|
|||
'error' => array()
|
||||
);
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
|
||||
$upload = $phpbb_container->get('files.upload');
|
||||
|
||||
if ($config['check_attachment_content'] && isset($config['mime_triggers']))
|
||||
|
@ -434,7 +433,7 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
|
|||
$upload->set_allowed_extensions(array_keys($extensions['_allowed_']));
|
||||
|
||||
/** @var \phpbb\files\filespec $file */
|
||||
$file = ($local) ? $upload->local_upload($local_storage, $local_filedata, $mimetype_guesser) : $upload->form_upload($form_name, $mimetype_guesser, $plupload);
|
||||
$file = ($local) ? $upload->local_upload($local_storage, $local_filedata) : $upload->form_upload($form_name, $plupload);
|
||||
|
||||
if ($file->init_error())
|
||||
{
|
||||
|
|
|
@ -123,7 +123,7 @@ class upload extends \phpbb\avatar\driver\driver
|
|||
|
||||
if (!empty($upload_file['name']))
|
||||
{
|
||||
$file = $upload->form_upload('avatar_upload_file', $this->mimetype_guesser);
|
||||
$file = $upload->form_upload('avatar_upload_file');
|
||||
}
|
||||
else if (!empty($this->config['allow_avatar_remote_upload']) && !empty($url))
|
||||
{
|
||||
|
@ -153,7 +153,7 @@ class upload extends \phpbb\avatar\driver\driver
|
|||
return false;
|
||||
}
|
||||
|
||||
$file = $upload->remote_upload($url, $this->mimetype_guesser);
|
||||
$file = $upload->remote_upload($url);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -131,13 +131,12 @@ class upload
|
|||
* Upload file from users harddisk
|
||||
*
|
||||
* @param string $form_name Form name assigned to the file input field (if it is an array, the key has to be specified)
|
||||
* @param \phpbb\mimetype\guesser $mimetype_guesser Mimetype guesser
|
||||
* @param \phpbb\plupload\plupload $plupload The plupload object
|
||||
*
|
||||
* @return object $file Object "filespec" is returned, all further operations can be done with this object
|
||||
* @access public
|
||||
*/
|
||||
function form_upload($form_name, \phpbb\mimetype\guesser $mimetype_guesser = null, \phpbb\plupload\plupload $plupload = null)
|
||||
function form_upload($form_name, \phpbb\plupload\plupload $plupload = null)
|
||||
{
|
||||
global $user, $request, $phpbb_container;
|
||||
|
||||
|
@ -216,7 +215,7 @@ class upload
|
|||
/**
|
||||
* Move file from another location to phpBB
|
||||
*/
|
||||
function local_upload($source_file, $filedata = false, \phpbb\mimetype\guesser $mimetype_guesser = null)
|
||||
function local_upload($source_file, $filedata = false)
|
||||
{
|
||||
global $user, $request, $phpbb_container;
|
||||
|
||||
|
@ -295,11 +294,10 @@ class upload
|
|||
* Uploads file from given url
|
||||
*
|
||||
* @param string $upload_url URL pointing to file to upload, for example http://www.foobar.com/example.gif
|
||||
* @param \phpbb\mimetype\guesser $mimetype_guesser Mimetype guesser
|
||||
* @return object $file Object "filespec" is returned, all further operations can be done with this object
|
||||
* @access public
|
||||
*/
|
||||
function remote_upload($upload_url, \phpbb\mimetype\guesser $mimetype_guesser = null)
|
||||
function remote_upload($upload_url)
|
||||
{
|
||||
global $user, $phpbb_root_path, $phpbb_container;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue