aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2013-03-04 02:39:44 +0100
committerAndreas Fischer <bantu@phpbb.com>2013-06-03 16:07:19 +0200
commitcb54f56c3db0bedefaa76113f7491203962004ed (patch)
treeff9c3bf26cc23f75f1848a1683fbeaa618a850b1
parent99d089ce9fec415b4054aec8ea4c1032080eb6a0 (diff)
downloadforums-cb54f56c3db0bedefaa76113f7491203962004ed.tar
forums-cb54f56c3db0bedefaa76113f7491203962004ed.tar.gz
forums-cb54f56c3db0bedefaa76113f7491203962004ed.tar.bz2
forums-cb54f56c3db0bedefaa76113f7491203962004ed.tar.xz
forums-cb54f56c3db0bedefaa76113f7491203962004ed.zip
[ticket/11586] Combine administrator/moderator checks together.
PHPBB3-11586
-rw-r--r--phpBB/includes/functions_posting.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index e823f8be75..8b4a833d8e 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -434,15 +434,15 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
// Do we have to create a thumbnail?
$filedata['thumbnail'] = ($cat_id == ATTACHMENT_CATEGORY_IMAGE && $config['img_create_thumbnail']) ? 1 : 0;
- // Check Image Size, if it is an image
- if (!$auth->acl_get('a_') && !$auth->acl_get('m_', $forum_id) && $cat_id == ATTACHMENT_CATEGORY_IMAGE)
- {
- $file->upload->set_allowed_dimensions(0, 0, $config['img_max_width'], $config['img_max_height']);
- }
-
- // Admins and mods are allowed to exceed the allowed filesize
if (!$auth->acl_get('a_') && !$auth->acl_get('m_', $forum_id))
{
+ // Check Image Size, if it is an image
+ if ($cat_id == ATTACHMENT_CATEGORY_IMAGE)
+ {
+ $file->upload->set_allowed_dimensions(0, 0, $config['img_max_width'], $config['img_max_height']);
+ }
+
+ // Admins and mods are allowed to exceed the allowed filesize
if (!empty($extensions[$file->get('extension')]['max_filesize']))
{
$allowed_filesize = $extensions[$file->get('extension')]['max_filesize'];