From 5fa25880e23f1ad72321da2e04c574d99f5546a2 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Mon, 4 Mar 2013 02:49:48 +0100 Subject: [PATCH] [ticket/11586] Move $filedata['thumbnail'] to where it might be returned. PHPBB3-11586 --- phpBB/includes/functions_posting.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index d6f7c9bab4..b9b518ad32 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -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();