mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/14548] Move deprecated globals and functions
PHPBB3-14584
This commit is contained in:
committed by
Marc Alexander
parent
61bdccbfd8
commit
7a831c3e28
@@ -397,34 +397,6 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
|
||||
//
|
||||
// Attachment related functions
|
||||
//
|
||||
|
||||
/**
|
||||
* Upload Attachment - filedata is generated here
|
||||
* Uses upload class
|
||||
*
|
||||
* @deprecated 3.2.0-a1 (To be removed: 3.4.0)
|
||||
*
|
||||
* @param string $form_name The form name of the file upload input
|
||||
* @param int $forum_id The id of the forum
|
||||
* @param bool $local Whether the file is local or not
|
||||
* @param string $local_storage The path to the local file
|
||||
* @param bool $is_message Whether it is a PM or not
|
||||
* @param array $local_filedata A filespec object created for the local file
|
||||
*
|
||||
* @return array File data array
|
||||
*/
|
||||
function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false, $local_filedata = false)
|
||||
{
|
||||
global $phpbb_container;
|
||||
|
||||
/** @var \phpbb\attachment\manager $attachment_manager */
|
||||
$attachment_manager = $phpbb_container->get('attachment.manager');
|
||||
$file = $attachment_manager->upload($form_name, $forum_id, $local, $local_storage, $is_message, $local_filedata);
|
||||
unset($attachment_manager);
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the needed size for Thumbnail
|
||||
*/
|
||||
|
Reference in New Issue
Block a user