mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/11586] Move $filedata['thumbnail'] to where it might be returned.
PHPBB3-11586
This commit is contained in:
parent
50e3173e8c
commit
5fa25880e2
1 changed files with 3 additions and 3 deletions
|
@ -425,9 +425,6 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
|
||||||
// Whether the uploaded file is in the image category
|
// 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;
|
$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))
|
if (!$auth->acl_get('a_') && !$auth->acl_get('m_', $forum_id))
|
||||||
{
|
{
|
||||||
// Check Image Size, if it is an image
|
// 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.
|
// Only then perform additional image checks.
|
||||||
$file->move_file($config['upload_path'], false, !$is_image);
|
$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))
|
if (sizeof($file->error))
|
||||||
{
|
{
|
||||||
$file->remove();
|
$file->remove();
|
||||||
|
|
Loading…
Add table
Reference in a new issue