1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-08 09:46:46 +02:00

[ticket/11162] Use phpbb_update_rows_avoiding_duplicates in mcp.

PHPBB3-11162
This commit is contained in:
Oleg Pudeyev
2012-12-01 20:21:51 -05:00
parent c2c105df9f
commit 69225bd0a6
2 changed files with 2 additions and 12 deletions

View File

@@ -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