From fbd741606055ed75c0ff1bc2a110d880cad4cbd4 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 17 May 2007 13:23:13 +0000 Subject: #11074 - only process and check (as well as display) images if the category also matches. ;) git-svn-id: file:///svn/phpbb/trunk@7616 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_posting.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 9fe27fdd1a..d75a548d1b 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -408,7 +408,11 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage } $file->clean_filename('unique', $user->data['user_id'] . '_'); - $file->move_file($config['upload_path']); + + // Are we uploading an image *and* this image being within the image category? Only then perform additional image checks. + $no_image = ($cat_id == ATTACHMENT_CATEGORY_IMAGE) ? false : true; + + $file->move_file($config['upload_path'], false, $no_image); if (sizeof($file->error)) { -- cgit v1.2.1