diff options
author | natec <natec@users.sourceforge.net> | 2001-12-11 08:55:17 +0000 |
---|---|---|
committer | natec <natec@users.sourceforge.net> | 2001-12-11 08:55:17 +0000 |
commit | 01b7683c36a3f065de20e037576fa04ae23b34fb (patch) | |
tree | 853ac69a1983694e094696021dea50be34d203ca /phpBB | |
parent | f0bf32c5c1d7bcacab86e0623b0600c2a694303c (diff) | |
download | forums-01b7683c36a3f065de20e037576fa04ae23b34fb.tar forums-01b7683c36a3f065de20e037576fa04ae23b34fb.tar.gz forums-01b7683c36a3f065de20e037576fa04ae23b34fb.tar.bz2 forums-01b7683c36a3f065de20e037576fa04ae23b34fb.tar.xz forums-01b7683c36a3f065de20e037576fa04ae23b34fb.zip |
bug #490286: undoing bbencode_first_pass() when bbcode was disabled is fruitless.
git-svn-id: file:///svn/phpbb/trunk@1554 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/posting.php | 6 | ||||
-rw-r--r-- | phpBB/privmsg.php | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 200971dd00..604b14e98a 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -2353,6 +2353,7 @@ else $post_subject = $postrow['post_subject']; $post_message = $postrow['post_text']; $post_bbcode_uid = $postrow['bbcode_uid']; + $post_bbcode_enabled = ($postrow['enable_bbcode'] == 1); if( $mode == "editpost" ) { @@ -2365,7 +2366,10 @@ else $user_sig = $userdata['user_sig']; } - $post_message = preg_replace("/\:(([a-z0-9]:)?)$post_bbcode_uid/si", "", $post_message); + if ($post_bbcode_enabled) + { + $post_message = preg_replace("/\:(([a-z0-9]:)?)$post_bbcode_uid/si", "", $post_message); + } $post_message = str_replace("<br />", "\n", $post_message); $post_message = preg_replace('#</textarea>#si', '</textarea>', $post_message); diff --git a/phpBB/privmsg.php b/phpBB/privmsg.php index 418f29ff07..7ff10ab514 100644 --- a/phpBB/privmsg.php +++ b/phpBB/privmsg.php @@ -1217,7 +1217,7 @@ else if( $submit || $refresh || $mode != "" ) if( $mode == "edit" ) { - $sql = "SELECT pm.privmsgs_id, pm.privmsgs_subject, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text, u.username, u.user_id, u.user_sig + $sql = "SELECT pm.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text, u.username, u.user_id, u.user_sig FROM " . PRIVMSGS_TABLE . " pm, " . PRIVMSGS_TEXT_TABLE . " pmt, " . USERS_TABLE . " u WHERE pm.privmsgs_id = $privmsg_id AND pmt.privmsgs_text_id = pm.privmsgs_id @@ -1238,8 +1238,13 @@ else if( $submit || $refresh || $mode != "" ) $privmsg_subject = $privmsg['privmsgs_subject']; $privmsg_message = $privmsg['privmsgs_text']; $privmsg_bbcode_uid = $privmsg['privmsgs_bbcode_uid']; + $privmsg_bbcode_enabled = ($privmsg['privmsgs_enable_bbcode'] == 1); - $privmsg_message = preg_replace("/\:(([a-z0-9]:)?)$privmsg_bbcode_uid/si", "", $privmsg_message); + if ($privmsg_bbcode_enabled) + { + $privmsg_message = preg_replace("/\:(([a-z0-9]:)?)$privmsg_bbcode_uid/si", "", $privmsg_message); + } + $privmsg_message = str_replace("<br />", "\n", $privmsg_message); $privmsg_message = preg_replace('#</textarea>#si', '</textarea>', $privmsg_message); |