aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/privmsg.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-02-13 01:42:38 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-02-13 01:42:38 +0000
commitf928eef92dc6ae521b02fe975a6a32585b324530 (patch)
treee6e74c2123bff73b487f91c83b5914db78036411 /phpBB/privmsg.php
parentdfba6520d67edaf816985f75a1f7a761ffe73415 (diff)
downloadforums-f928eef92dc6ae521b02fe975a6a32585b324530.tar
forums-f928eef92dc6ae521b02fe975a6a32585b324530.tar.gz
forums-f928eef92dc6ae521b02fe975a6a32585b324530.tar.bz2
forums-f928eef92dc6ae521b02fe975a6a32585b324530.tar.xz
forums-f928eef92dc6ae521b02fe975a6a32585b324530.zip
Fix MSSQL slashing issue with copying received messages ... hopefully, bug #516738
git-svn-id: file:///svn/phpbb/trunk@2126 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/privmsg.php')
-rw-r--r--phpBB/privmsg.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/phpBB/privmsg.php b/phpBB/privmsg.php
index 00f1580f88..2855b73b0b 100644
--- a/phpBB/privmsg.php
+++ b/phpBB/privmsg.php
@@ -320,17 +320,17 @@ else if( $mode == "read" )
// users ... hopefully!
//
$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'] . ")";
+ 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) )
{
message_die(GENERAL_ERROR, "Could not insert private message sent info.", "", __LINE__, __FILE__, $sql);
}
else
{
- $privmsg_sent_id = $db->sql_nextid($pm_sent_status);
+ $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'] . "', '" . addslashes(str_replace("\'", "''", $privmsg['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))
{
message_die(GENERAL_ERROR, "Could not insert private message sent text.<BR>$sql", "", __LINE__, __FILE__, $sql);
@@ -675,6 +675,8 @@ else if( ( $delete && $mark_list ) || $delete_all )
//
// 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' )
{