mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-06 07:35:29 +02:00
[ticket/11586] Combine administrator/moderator checks together.
PHPBB3-11586
This commit is contained in:
parent
99d089ce9f
commit
cb54f56c3d
@ -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'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user