aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-06-29 10:59:36 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-06-29 10:59:36 +0000
commit4d6a76730501a55e696971845c90f364a3921512 (patch)
tree107f63c438532906a5b5ad72576fb3e39d1259ed /phpBB/posting.php
parentb85637fc1a326803f70dbf8018ed505cb0258010 (diff)
downloadforums-4d6a76730501a55e696971845c90f364a3921512.tar
forums-4d6a76730501a55e696971845c90f364a3921512.tar.gz
forums-4d6a76730501a55e696971845c90f364a3921512.tar.bz2
forums-4d6a76730501a55e696971845c90f364a3921512.tar.xz
forums-4d6a76730501a55e696971845c90f364a3921512.zip
a few fixes
git-svn-id: file:///svn/phpbb/trunk@4184 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php30
1 files changed, 14 insertions, 16 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 3747c79e29..dd41f0991a 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -221,7 +221,6 @@ if ($sql != '')
$db->sql_freeresult($result);
}
-
$message_parser = new parse_message(0); // <- TODO: add constant (MSG_POST/MSG_PM)
@@ -479,7 +478,6 @@ if ($mode == 'delete' && $poster_id == $user->data['user_id'] && $auth->acl_get(
trigger_error($user->lang['CANNOT_DELETE_REPLIED']);
}
-
if ($mode == 'delete')
{
trigger_error('USER_CANNOT_DELETE');
@@ -642,18 +640,10 @@ if ($submit || $preview || $refresh)
if ($mode != 'edit' || $message_md5 != $post_checksum || $status_switch || $preview)
{
// Parse message
- if ($result = $message_parser->parse($enable_html, $enable_bbcode, $enable_urls, $enable_smilies, $img_status, $flash_status))
- {
- $error[] = $result;
- }
+ $message_parser->parse($enable_html, $enable_bbcode, $enable_urls, $enable_smilies, $img_status, $flash_status);
}
- $result = $message_parser->parse_attachments($mode, $post_id, $submit, $preview, $refresh);
-
- if (count($result))
- {
- $error[] = implode('<br />', $result);
- }
+ $message_parser->parse_attachments($mode, $post_id, $submit, $preview, $refresh);
if ($mode != 'edit' && !$preview && !$refresh && !$auth->acl_get('f_ignoreflood', $forum_id))
{
@@ -707,10 +697,7 @@ if ($submit || $preview || $refresh)
);
$poll = array();
- if (($result = $message_parser->parse_poll($poll, $poll_data)) != '')
- {
- $error[] = $result;
- }
+ $message_parser->parse_poll($poll, $poll_data);
$poll_options = $poll['poll_options'];
$poll_title = $poll['poll_title'];
@@ -739,6 +726,11 @@ if ($submit || $preview || $refresh)
}
}
+ if (sizeof($message_parser->warn_msg))
+ {
+ $error[] = implode('<br />', $message_parser->warn_msg);
+ }
+
// Store message, sync counters
if (!sizeof($error) && $submit)
{
@@ -1081,6 +1073,12 @@ if (($mode == 'post' || ($mode == 'edit' && $post_id == $topic_first_post_id &&
'POLL_LENGTH' => $poll_length)
);
}
+else if ($mode == 'edit' && !empty($poll_last_vote) && ($auth->acl_get('f_poll', $forum_id) || $auth->acl_get('m_edit', $forum_id)))
+{
+ $template->assign_vars(array(
+ 'S_POLL_DELETE' => ($mode == 'edit' && !empty($poll_options) && ($auth->acl_get('f_delete', $forum_id) || $auth->acl_get('m_delete', $forum_id))) ? true : false)
+ );
+}
// Attachment entry
if ($auth->acl_get('f_attach', $forum_id) || $auth->acl_get('m_edit', $forum_id))