From 3616d540947c67ea020c66d36518c792429bc163 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 10 Apr 2003 21:35:31 +0000 Subject: initial 'view attachments' implementation. added new template var (merged include, to preserve previous block vars), could be changed later to consider caching. some config variables and upload icons are not present as of yet... git-svn-id: file:///svn/phpbb/trunk@3807 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/message_parser.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'phpBB/includes/message_parser.php') diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index e18abd6ce1..fcbc470b93 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -179,8 +179,6 @@ class parse_message { global $config, $_FILE, $_POST, $auth, $user; - $config['max_attachments'] = 1; - $error = false; $error_msg = ''; @@ -194,7 +192,7 @@ class parse_message if ( $submit && ($mode == 'post' || $mode == 'reply' || $mode == 'edit') && $attachment_data['filename'] != '') { - if ( $num_attachments < $config['max_attachments'] || $auth->acl_get('m_', 'a_') ) + if ( $num_attachments < $config['max_attachments'] ) //|| $auth->acl_gets('m_', 'a_', $forum_id) ) { $filedata = upload_attachment($attachment_data['filename']); @@ -326,7 +324,7 @@ class parse_message if ((($add_file) || ($preview) ) && ($attachment_data['filename'] != '') ) { - if ( $num_attachments < $config['max_attachments'] || $auth->acl_get('m_', 'a_') ) + if ( $num_attachments < $config['max_attachments'] ) //|| $auth->acl_gets('m_', 'a_', $forum_id) ) { $filedata = upload_attachment($attachment_data['filename']); @@ -372,7 +370,7 @@ class parse_message $err_msg = ''; // Process poll options - if (!empty($poll_data['poll_option_text']) && (($auth->acl_get('f_poll', $forum_id) && !$poll_data['poll_last_vote']) || $auth->acl_gets('m_edit', 'a_', $forum_id))) + if (!empty($poll_data['poll_option_text']) && (($auth->acl_get('f_poll', $forum_id) && !$poll_data['poll_last_vote']) || $auth->acl_get('m_edit', $forum_id))) { if (($result = $this->parse($poll_data['poll_option_text'], $poll_data['enable_html'], $poll_data['enable_bbcode'], $poll_data['bbcode_uid'], $poll_data['enable_urls'], $poll_data['enable_smilies'], false)) != '') { -- cgit v1.2.1