aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-04-16 21:16:57 +0000
committerLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-04-16 21:16:57 +0000
commitf641d8a0bb03961be485c59c8cb7a652b5a5b999 (patch)
tree9c319de87bff83fa83015226caeb9bbf3623a6ec /phpBB/posting.php
parentaaa2c6faab5d6f635b63c4bb40ec90874dd83f91 (diff)
downloadforums-f641d8a0bb03961be485c59c8cb7a652b5a5b999.tar
forums-f641d8a0bb03961be485c59c8cb7a652b5a5b999.tar.gz
forums-f641d8a0bb03961be485c59c8cb7a652b5a5b999.tar.bz2
forums-f641d8a0bb03961be485c59c8cb7a652b5a5b999.tar.xz
forums-f641d8a0bb03961be485c59c8cb7a652b5a5b999.zip
Moved some code around, nothing serious.
Attention, bbcode() constructor now accepts only one argument: bbcode_bitfield git-svn-id: file:///svn/phpbb/trunk@3858 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php26
1 files changed, 16 insertions, 10 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 227dfc143d..638f08786e 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -181,8 +181,6 @@ if ($sql != '')
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- $message_parser->bbcode_uid = $row['bbcode_uid'];
-
$forum_id = intval($row['forum_id']);
$topic_id = intval($row['topic_id']);
$post_id = intval($row['post_id']);
@@ -376,6 +374,11 @@ if ( ($mode == 'edit') && ($post_edit_locked) && (!$auth->acl_gets('m_', 'a_', $
$message_parser = new parse_message(0); // <- TODO: add constant (MSG_POST/MSG_PM)
+if ($mode == 'edit')
+{
+ $message_parser->bbcode_uid = $row['bbcode_uid'];
+}
+
// Delete triggered ?
if ( ($mode == 'delete') && ((($poster_id == $user->data['user_id']) && ($user->data['user_id'] != ANONYMOUS) && ($perm['u_delete']) && ($post_id == $topic_last_post_id)) || ($perm['m_delete'])) )
{
@@ -668,11 +671,8 @@ if ($preview)
$post_time = $current_time;
- // DEBUG
- // $message_parser->bbcode_bitfield = bindec('1111111111');
-
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
- $bbcode = new bbcode($message_parser->bbcode_uid, $message_parser->bbcode_bitfield);
+ $bbcode = new bbcode($message_parser->bbcode_bitfield);
$preview_message = format_display($message_parser->message, $enable_html, $enable_bbcode, $message_parser->bbcode_uid, $enable_urls, $enable_smilies, $enable_sig);
@@ -700,12 +700,18 @@ if ($preview)
// Decode text for message display
decode_text($post_text, $message_parser->bbcode_uid);
-decode_text($subject, $message_parser->bbcode_uid);
+if ($subject)
+{
+ decode_text($subject, $message_parser->bbcode_uid);
+}
// Save us some processing time. ;)
-$poll_options_tmp = implode("\n", $poll_options);
-decode_text($poll_options_tmp);
-$poll_options = explode("\n", $poll_options_tmp);
+if (count($poll_options_tmp))
+{
+ $poll_options_tmp = implode("\n", $poll_options);
+ decode_text($poll_options_tmp);
+ $poll_options = explode("\n", $poll_options_tmp);
+}
if (($mode == 'quote') && (!$preview) && (!$refresh))
{