diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-12-21 22:39:23 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-12-21 22:39:23 +0000 |
| commit | 5bd3fb4df7071bca07cf1ae61f8167867790aca2 (patch) | |
| tree | aae4937848beb201be1ee16974c0123386d20b0d /phpBB/modcp.php | |
| parent | e06886df8ff40d4ec55840f7d1e483464d9a31d6 (diff) | |
| download | forums-5bd3fb4df7071bca07cf1ae61f8167867790aca2.tar forums-5bd3fb4df7071bca07cf1ae61f8167867790aca2.tar.gz forums-5bd3fb4df7071bca07cf1ae61f8167867790aca2.tar.bz2 forums-5bd3fb4df7071bca07cf1ae61f8167867790aca2.tar.xz forums-5bd3fb4df7071bca07cf1ae61f8167867790aca2.zip | |
Another \' update ...
git-svn-id: file:///svn/phpbb/trunk@1668 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/modcp.php')
| -rw-r--r-- | phpBB/modcp.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/modcp.php b/phpBB/modcp.php index fe180e2c62..3da34a7f82 100644 --- a/phpBB/modcp.php +++ b/phpBB/modcp.php @@ -523,7 +523,7 @@ switch($mode) { // Insert topic in the old forum that indicates that the forum has moved. $sql = "INSERT INTO " . TOPICS_TABLE . " (forum_id, topic_title, topic_poster, topic_time, topic_status, topic_type, topic_vote, topic_views, topic_replies, topic_last_post_id, topic_moved_id) - VALUES ($old_forum_id, '" . addslashes($row[$i]['topic_title']) . "', '" . $row[$i]['topic_poster'] . "', " . $row[$i]['topic_time'] . ", " . TOPIC_MOVED . ", " . POST_NORMAL . ", " . $row[$i]['topic_vote'] . ", " . $row[$i]['topic_views'] . ", " . $row[$i]['topic_replies'] . ", " . $row[$i]['topic_last_post_id'] . ", $topic_id)"; + VALUES ($old_forum_id, '" . addslashes(str_replace("\'", "''", $row[$i]['topic_title'])) . "', '" . str_replace("\'", "''", $row[$i]['topic_poster']) . "', " . $row[$i]['topic_time'] . ", " . TOPIC_MOVED . ", " . POST_NORMAL . ", " . $row[$i]['topic_vote'] . ", " . $row[$i]['topic_views'] . ", " . $row[$i]['topic_replies'] . ", " . $row[$i]['topic_last_post_id'] . ", $topic_id)"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Could not insert shadow topic", "Error", __LINE__, __FILE__, $sql); @@ -725,7 +725,7 @@ switch($mode) } $post_rowset = $db->sql_fetchrow($result); - $first_poster = $post_rowset['poster_id']; + $first_poster = str_replace("\'", "''", $post_rowset['poster_id']); $topic_id = $post_rowset['topic_id']; $post_time = $post_rowset['post_time']; @@ -740,7 +740,7 @@ switch($mode) $sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type) - VALUES ('$post_subject', $first_poster, " . $topic_time . ", $new_forum_id, " . TOPIC_UNLOCKED . ", " . POST_NORMAL . ")"; + VALUES ('" . str_replace("\'", "''", $post_subject) . "', $first_poster, " . $topic_time . ", $new_forum_id, " . TOPIC_UNLOCKED . ", " . POST_NORMAL . ")"; if(!$result = $db->sql_query($sql, BEGIN_TRANSACTION)) { message_die(GENERAL_ERROR, "Could not insert new topic", "", __LINE__, __FILE__, $sql); @@ -1174,4 +1174,4 @@ switch($mode) include($phpbb_root_path . 'includes/page_tail.'.$phpEx); -?> +?>
\ No newline at end of file |
