mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/11586] Move $filedata['thumbnail'] to where it might be returned.
PHPBB3-11586
This commit is contained in:
@@ -425,9 +425,6 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
|
||||
// Whether the uploaded file is in the image category
|
||||
$is_image = (isset($extensions[$file->get('extension')]['display_cat'])) ? $extensions[$file->get('extension')]['display_cat'] == ATTACHMENT_CATEGORY_IMAGE : false;
|
||||
|
||||
// Do we have to create a thumbnail?
|
||||
$filedata['thumbnail'] = ($is_image && $config['img_create_thumbnail']) ? 1 : 0;
|
||||
|
||||
if (!$auth->acl_get('a_') && !$auth->acl_get('m_', $forum_id))
|
||||
{
|
||||
// Check Image Size, if it is an image
|
||||
@@ -455,6 +452,9 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
|
||||
// Only then perform additional image checks.
|
||||
$file->move_file($config['upload_path'], false, !$is_image);
|
||||
|
||||
// Do we have to create a thumbnail?
|
||||
$filedata['thumbnail'] = ($is_image && $config['img_create_thumbnail']) ? 1 : 0;
|
||||
|
||||
if (sizeof($file->error))
|
||||
{
|
||||
$file->remove();
|
||||
|
Reference in New Issue
Block a user