mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 13:30:25 +02:00
- check for array [lang]
- admin_forums delete routine updated - added extension groups per forum git-svn-id: file:///svn/phpbb/trunk@4861 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -162,7 +162,7 @@ function update_last_post_information($type, $id)
|
||||
}
|
||||
|
||||
// Upload Attachment - filedata is generated here
|
||||
function upload_attachment($filename, $local = false, $local_storage = '')
|
||||
function upload_attachment($forum_id, $filename, $local = false, $local_storage = '')
|
||||
{
|
||||
global $auth, $user, $config, $db;
|
||||
|
||||
@@ -188,7 +188,7 @@ function upload_attachment($filename, $local = false, $local_storage = '')
|
||||
obtain_attach_extensions($extensions);
|
||||
|
||||
// Check Extension
|
||||
if (!in_array($filedata['extension'], $extensions['_allowed_']))
|
||||
if ((is_array($extensions['_allowed_'][$filedata['extension']]) && !in_array($forum_id, $extensions['_allowed_'][$filedata['extension']])) || !isset($extensions['_allowed_'][$filedata['extension']]))
|
||||
{
|
||||
$filedata['error'][] = sprintf($user->lang['DISALLOWED_EXTENSION'], $filedata['extension']);
|
||||
$filedata['post_attach'] = false;
|
||||
|
Reference in New Issue
Block a user