|
From: Paul S. O. <ps...@us...> - 2001-11-29 12:46:19
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv13221
Modified Files:
posting.php privmsg.php
Log Message:
Fix bug #486674 and removed superfluous/commented lines for html treatment
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.115
retrieving revision 1.116
diff -C2 -r1.115 -r1.116
*** posting.php 2001/11/27 18:26:03 1.115
--- posting.php 2001/11/29 12:46:16 1.116
***************
*** 662,665 ****
--- 662,666 ----
$post_append = "";
}
+ header("HTTP/1.0 302 Redirect");
header("Location:" . append_sid($redirect) . $post_append, true);
}
***************
*** 986,989 ****
--- 987,991 ----
}
+ header("HTTP/1.0 302 Redirect");
header("Location: " . append_sid("login.$phpEx?redirect=posting.$phpEx&" . $redirect, true));
***************
*** 1823,1826 ****
--- 1825,1829 ----
else
{
+ header("HTTP/1.0 302 Redirect");
header("Location: " . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true));
}
***************
*** 2367,2371 ****
$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($html_entities_match, $html_entities_replace, $post_message);
$post_message = preg_replace('#</textarea>#si', '</textarea>', $post_message);
--- 2370,2373 ----
Index: privmsg.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/privmsg.php,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -r1.57 -r1.58
*** privmsg.php 2001/11/27 18:26:03 1.57
--- privmsg.php 2001/11/29 12:46:16 1.58
***************
*** 38,43 ****
// Var definitions
//
! $html_entities_match = array("#<#", "#>#", "#& #", "#\"#");
! $html_entities_replace = array("<", ">", "& ", """);
//
--- 38,43 ----
// Var definitions
//
! $html_entities_match = array("#&#", "#<#", "#>#", "#\"#");
! $html_entities_replace = array("&", "<", ">", """);
//
***************
*** 1112,1116 ****
$to_username = ( isset($HTTP_POST_VARS['username']) ) ? trim(strip_tags(stripslashes($HTTP_POST_VARS['username']))) : "";
$privmsg_subject = ( isset($HTTP_POST_VARS['subject']) ) ? trim(strip_tags(stripslashes($HTTP_POST_VARS['subject']))) : "";
! $privmsg_message = ( isset($HTTP_POST_VARS['message']) ) ? trim(stripslashes($HTTP_POST_VARS['message'])) : "";
$privmsg_message = preg_replace('#<textarea>#si', '<textarea>', $privmsg_message);
--- 1112,1116 ----
$to_username = ( isset($HTTP_POST_VARS['username']) ) ? trim(strip_tags(stripslashes($HTTP_POST_VARS['username']))) : "";
$privmsg_subject = ( isset($HTTP_POST_VARS['subject']) ) ? trim(strip_tags(stripslashes($HTTP_POST_VARS['subject']))) : "";
! $privmsg_message = ( isset($HTTP_POST_VARS['message']) ) ? trim($HTTP_POST_VARS['message']) : "";
$privmsg_message = preg_replace('#<textarea>#si', '<textarea>', $privmsg_message);
***************
*** 1218,1222 ****
if( $mode == "edit" )
{
! $sql = "SELECT pm.privmsgs_id, pm.privmsgs_subject, 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.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
***************
*** 1238,1245 ****
$privmsg_subject = $privmsg['privmsgs_subject'];
$privmsg_message = $privmsg['privmsgs_text'];
! $privmsg_message = preg_replace("/\:[0-9a-z\:]*?\]/si", "]", $privmsg_message);
$privmsg_message = str_replace("<br />", "\n", $privmsg_message);
- $privmsg_message = preg_replace($html_entities_match, $html_entities_replace, $privmsg_message);
$privmsg_message = preg_replace('#</textarea>#si', '</textarea>', $privmsg_message);
--- 1238,1245 ----
$privmsg_subject = $privmsg['privmsgs_subject'];
$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);
***************
*** 1253,1257 ****
{
! $sql = "SELECT pm.privmsgs_subject, pm.privmsgs_date, pmt.privmsgs_text, u.username, u.user_id
FROM " . PRIVMSGS_TABLE . " pm, " . PRIVMSGS_TEXT_TABLE . " pmt, " . USERS_TABLE . " u
WHERE pm.privmsgs_id = $privmsg_id
--- 1253,1257 ----
{
! $sql = "SELECT pm.privmsgs_subject, pm.privmsgs_date, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text, u.username, u.user_id
FROM " . PRIVMSGS_TABLE . " pm, " . PRIVMSGS_TEXT_TABLE . " pmt, " . USERS_TABLE . " u
WHERE pm.privmsgs_id = $privmsg_id
***************
*** 1271,1287 ****
$privmsg_subject = ( (strstr("Re:", $privmsg['privmsgs_subject'])) ? $lang['Re'] . ":" : "" ) . $privmsg['privmsgs_subject'];
$to_username = $privmsg['username'];
$to_userid = $privmsg['user_id'];
! $privmsg_message = preg_replace("/\:(([a-z0-9]:)?)$post_bbcode_uid/si", "", $privmsg_message);
$privmsg_message = str_replace("<br />", "\n", $privmsg_message);
- $privmsg_message = preg_replace($html_entities_match, $html_entities_replace, $privmsg_message);
$privmsg_message = preg_replace('#</textarea>#si', '</textarea>', $privmsg_message);
if( $mode == "quote" )
{
- $privmsg_message = $privmsg['privmsgs_text'];
-
$msg_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['board_timezone']); //"[date]" . $privmsg['privmsgs_time'] . "[/date]";
--- 1271,1286 ----
$privmsg_subject = ( (strstr("Re:", $privmsg['privmsgs_subject'])) ? $lang['Re'] . ":" : "" ) . $privmsg['privmsgs_subject'];
+ $privmsg_message = $privmsg['privmsgs_text'];
+ $privmsg_bbcode_uid = $privmsg['privmsgs_bbcode_uid'];
$to_username = $privmsg['username'];
$to_userid = $privmsg['user_id'];
! $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);
if( $mode == "quote" )
{
$msg_date = create_date($board_config['default_dateformat'], $privmsg['privmsgs_date'], $board_config['board_timezone']); //"[date]" . $privmsg['privmsgs_time'] . "[/date]";
***************
*** 1320,1324 ****
}
! $preview_message = prepare_message($privmsg_message, $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
//
--- 1319,1324 ----
}
! $preview_message = stripslashes(prepare_message($privmsg_message, $html_on, $bbcode_on, $smilies_on, $bbcode_uid));
! $privmsg_message = stripslashes(preg_replace($html_entities_match, $html_entities_replace, $privmsg_message));
//
|