|
From: Nathan C. <na...@us...> - 2001-12-11 08:55:20
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv6514
Modified Files:
posting.php privmsg.php
Log Message:
bug #490286: undoing bbencode_first_pass() when bbcode was disabled is fruitless.
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.122
retrieving revision 1.123
diff -C2 -r1.122 -r1.123
*** posting.php 2001/12/11 08:43:04 1.122
--- posting.php 2001/12/11 08:55:17 1.123
***************
*** 2354,2357 ****
--- 2354,2358 ----
$post_message = $postrow['post_text'];
$post_bbcode_uid = $postrow['bbcode_uid'];
+ $post_bbcode_enabled = ($postrow['enable_bbcode'] == 1);
if( $mode == "editpost" )
***************
*** 2366,2370 ****
}
! $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);
--- 2367,2374 ----
}
! 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);
Index: privmsg.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/privmsg.php,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -r1.60 -r1.61
*** privmsg.php 2001/11/29 22:51:34 1.60
--- privmsg.php 2001/12/11 08:55:17 1.61
***************
*** 1218,1222 ****
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
FROM " . PRIVMSGS_TABLE . " pm, " . PRIVMSGS_TEXT_TABLE . " pmt, " . USERS_TABLE . " u
WHERE pm.privmsgs_id = $privmsg_id
--- 1218,1222 ----
if( $mode == "edit" )
{
! $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
***************
*** 1239,1244 ****
$privmsg_message = $privmsg['privmsgs_text'];
$privmsg_bbcode_uid = $privmsg['privmsgs_bbcode_uid'];
! $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);
--- 1239,1249 ----
$privmsg_message = $privmsg['privmsgs_text'];
$privmsg_bbcode_uid = $privmsg['privmsgs_bbcode_uid'];
+ $privmsg_bbcode_enabled = ($privmsg['privmsgs_enable_bbcode'] == 1);
! 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);
|