diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-07-10 15:55:10 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-07-10 15:55:10 +0000 |
| commit | 4f7c52e9e385041320179dcb7d27a9217a353c71 (patch) | |
| tree | bcab21e9174983a19f2c6256b36435ffb56ad080 /phpBB/includes/functions_posting.php | |
| parent | 0fa9103a0cacbe91404c32cddf0bcfe029423d04 (diff) | |
| download | forums-4f7c52e9e385041320179dcb7d27a9217a353c71.tar forums-4f7c52e9e385041320179dcb7d27a9217a353c71.tar.gz forums-4f7c52e9e385041320179dcb7d27a9217a353c71.tar.bz2 forums-4f7c52e9e385041320179dcb7d27a9217a353c71.tar.xz forums-4f7c52e9e385041320179dcb7d27a9217a353c71.zip | |
fix some bugs... again. :)
git-svn-id: file:///svn/phpbb/trunk@6165 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
| -rw-r--r-- | phpBB/includes/functions_posting.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 6ae39be7a9..9096586b33 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -339,9 +339,18 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage $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)) { - $allowed_filesize = ($extensions[$file->get('extension')]['max_filesize'] != 0) ? $extensions[$file->get('extension')]['max_filesize'] : (($is_message) ? $config['max_filesize_pm'] : $config['max_filesize']); + if (!empty($extensions[$file->get('extension')]['max_filesize'])) + { + $allowed_filesize = $extensions[$file->get('extension')]['max_filesize']; + } + else + { + $allowed_filesize = ($is_message) ? $config['max_filesize_pm'] : $config['max_filesize']; + } + $file->upload->set_max_filesize($allowed_filesize); } |
