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();