aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index e4520d7f03..8b17dba534 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -311,6 +311,7 @@ function posting_gen_topic_icons($mode, $icon_id)
{
$template->assign_block_vars('topic_icon', array(
'ICON_ID' => $id,
+ 'ICON_NAME' => $data['img'],
'ICON_IMG' => $root_path . $config['icons_path'] . '/' . $data['img'],
'ICON_WIDTH' => $data['width'],
'ICON_HEIGHT' => $data['height'],
@@ -404,14 +405,13 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false, $local_filedata = false, \phpbb\mimetype\guesser $mimetype_guesser = null, \phpbb\plupload\plupload $plupload = null)
{
global $auth, $user, $config, $db, $cache;
- global $phpbb_root_path, $phpEx, $phpbb_dispatcher, $phpbb_filesystem;
+ global $phpbb_root_path, $phpEx, $phpbb_dispatcher, $phpbb_container;
$filedata = array(
'error' => array()
);
- include_once($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
- $upload = new fileupload($phpbb_filesystem);
+ $upload = $phpbb_container->get('files.upload');
if ($config['check_attachment_content'] && isset($config['mime_triggers']))
{
@@ -433,9 +433,10 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
$extensions = $cache->obtain_attach_extensions((($is_message) ? false : (int) $forum_id));
$upload->set_allowed_extensions(array_keys($extensions['_allowed_']));
- $file = ($local) ? $upload->local_upload($local_storage, $local_filedata, $mimetype_guesser) : $upload->form_upload($form_name, $mimetype_guesser, $plupload);
+ /** @var \phpbb\files\filespec $file */
+ $file = ($local) ? $upload->handle_upload('files.types.local', $local_storage, $local_filedata) : $upload->handle_upload('files.types.form', $form_name);
- if ($file->init_error)
+ if ($file->init_error())
{
$filedata['post_attach'] = false;
return $filedata;
@@ -1700,6 +1701,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
$phpbb_log->add('mod', $user->data['user_id'], $user->ip, 'LOG_POST_EDITED', false, array(
'forum_id' => $data['forum_id'],
'topic_id' => $data['topic_id'],
+ 'post_id' => $data['post_id'],
$log_subject,
(!empty($username)) ? $username : $user->lang['GUEST'],
$data['post_edit_reason']
@@ -2666,6 +2668,7 @@ function phpbb_handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $
$phpbb_log->add('mod', $user->data['user_id'], $user->ip, (($is_soft) ? 'LOG_SOFTDELETE_POST' : 'LOG_DELETE_POST'), false, array(
'forum_id' => $forum_id,
'topic_id' => $topic_id,
+ 'post_id' => $post_id,
$post_data['post_subject'],
$post_username,
$delete_reason