aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2004-03-10 20:30:26 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2004-03-10 20:30:26 +0000
commit7487bfce48dd90ea370c8a40e67a75b814f2eb37 (patch)
tree0896d08ec9993dc920de00ebdcaf9c59eb0792fa /phpBB/includes/functions_posting.php
parentc235dced700cd0223ac36880a25ff25110d8d6f4 (diff)
downloadforums-7487bfce48dd90ea370c8a40e67a75b814f2eb37.tar
forums-7487bfce48dd90ea370c8a40e67a75b814f2eb37.tar.gz
forums-7487bfce48dd90ea370c8a40e67a75b814f2eb37.tar.bz2
forums-7487bfce48dd90ea370c8a40e67a75b814f2eb37.tar.xz
forums-7487bfce48dd90ea370c8a40e67a75b814f2eb37.zip
- 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
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 23bcbd25d4..4c5a3d4c69 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -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;