|
From: Paul S. O. <ps...@us...> - 2002-02-13 01:42:41
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv3231
Modified Files:
privmsg.php
Log Message:
Fix MSSQL slashing issue with copying received messages ... hopefully, bug #516738
Index: privmsg.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/privmsg.php,v
retrieving revision 1.79
retrieving revision 1.80
diff -C2 -r1.79 -r1.80
*** privmsg.php 13 Feb 2002 01:34:46 -0000 1.79
--- privmsg.php 13 Feb 2002 01:42:38 -0000 1.80
***************
*** 321,325 ****
//
$sql = "INSERT $sql_priority INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig)
! VALUES (" . PRIVMSGS_SENT_MAIL . ", '" . addslashes(str_replace("\'", "''", $privmsg['privmsgs_subject'])) . "', " . $privmsg['privmsgs_from_userid'] . ", " . $privmsg['privmsgs_to_userid'] . ", " . $privmsg['privmsgs_date'] . ", '" . $privmsg['privmsgs_ip'] . "', " . $privmsg['privmsgs_enable_html'] . ", " . $privmsg['privmsgs_enable_bbcode'] . ", " . $privmsg['privmsgs_enable_smilies'] . ", " . $privmsg['privmsgs_attach_sig'] . ")";
if( !$pm_sent_status = $db->sql_query($sql) )
{
--- 321,325 ----
//
$sql = "INSERT $sql_priority INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig)
! VALUES (" . PRIVMSGS_SENT_MAIL . ", '" . str_replace("\'", "''", addslashes($privmsg['privmsgs_subject'])) . "', " . $privmsg['privmsgs_from_userid'] . ", " . $privmsg['privmsgs_to_userid'] . ", " . $privmsg['privmsgs_date'] . ", '" . $privmsg['privmsgs_ip'] . "', " . $privmsg['privmsgs_enable_html'] . ", " . $privmsg['privmsgs_enable_bbcode'] . ", " . $privmsg['privmsgs_enable_smilies'] . ", " . $privmsg['privmsgs_attach_sig'] . ")";
if( !$pm_sent_status = $db->sql_query($sql) )
{
***************
*** 328,335 ****
else
{
! $privmsg_sent_id = $db->sql_nextid($pm_sent_status);
$sql = "INSERT $sql_priority INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text)
! VALUES ($privmsg_sent_id, '" . $privmsg['privmsgs_bbcode_uid'] . "', '" . addslashes(str_replace("\'", "''", $privmsg['privmsgs_text'])) . "')";
if(!$pm_sent_text_status = $db->sql_query($sql))
{
--- 328,335 ----
else
{
! $privmsg_sent_id = $db->sql_nextid();
$sql = "INSERT $sql_priority INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text)
! VALUES ($privmsg_sent_id, '" . $privmsg['privmsgs_bbcode_uid'] . "', '" . str_replace("\'", "''", addslashes($privmsg['privmsgs_text'])) . "')";
if(!$pm_sent_text_status = $db->sql_query($sql))
{
***************
*** 676,679 ****
--- 676,681 ----
//
// Need to decrement the new message counter of recipient
+ // problem is this doesn't affect the unread counter even
+ // though it may be the one that needs changing ... hhmmm
//
if ( $folder == 'outbox' )
|