diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-01 20:21:51 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-01 23:09:31 -0500 |
commit | 69225bd0a6005e81b7cb58631eb5de7c3d175697 (patch) | |
tree | e60f9bd6d62a959e291e9d60b29c837801e6546b /phpBB/includes/mcp/mcp_topic.php | |
parent | c2c105df9ff1d8fd48afa1d3abdf23a39584d7ed (diff) | |
download | forums-69225bd0a6005e81b7cb58631eb5de7c3d175697.tar forums-69225bd0a6005e81b7cb58631eb5de7c3d175697.tar.gz forums-69225bd0a6005e81b7cb58631eb5de7c3d175697.tar.bz2 forums-69225bd0a6005e81b7cb58631eb5de7c3d175697.tar.xz forums-69225bd0a6005e81b7cb58631eb5de7c3d175697.zip |
[ticket/11162] Use phpbb_update_rows_avoiding_duplicates in mcp.
PHPBB3-11162
Diffstat (limited to 'phpBB/includes/mcp/mcp_topic.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_topic.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 7d4edaf362..f40a4bc044 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -620,12 +620,7 @@ function merge_posts($topic_id, $to_topic_id) else { // If the topic no longer exist, we will update the topic watch table. - // To not let it error out on users watching both topics, we just return on an error... - $db->sql_return_on_error(true); - $db->sql_query('UPDATE ' . TOPICS_WATCH_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE topic_id = ' . (int) $topic_id); - $db->sql_return_on_error(false); - - $db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE topic_id = ' . (int) $topic_id); + phpbb_update_rows_avoiding_duplicates($db, TOPICS_WATCH_TABLE, 'topic_id', $topic_ids, $to_topic_id); } // Link to the new topic |