diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-12-15 18:25:51 -0600 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-12-15 18:25:51 -0600 |
commit | c9ca7051491143e3c0da43663e85b60e18c6740e (patch) | |
tree | ec10169c1d5737f2e48eac0f6997fd6e55716049 /phpBB/includes/mcp/mcp_topic.php | |
parent | d0375c46f91eb88508cbd8e320c7eda78d4f01dd (diff) | |
parent | 95bd4d73eb41d677470b0bf77c521ae2a9bb731e (diff) | |
download | forums-c9ca7051491143e3c0da43663e85b60e18c6740e.tar forums-c9ca7051491143e3c0da43663e85b60e18c6740e.tar.gz forums-c9ca7051491143e3c0da43663e85b60e18c6740e.tar.bz2 forums-c9ca7051491143e3c0da43663e85b60e18c6740e.tar.xz forums-c9ca7051491143e3c0da43663e85b60e18c6740e.zip |
Merge branch 'ticket/11103' of github.com:EXreaction/phpbb3 into ticket/11103
Diffstat (limited to 'phpBB/includes/mcp/mcp_topic.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_topic.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 63ff7bed72..6c3ebddf49 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -624,12 +624,11 @@ 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); + if (!function_exists('phpbb_update_rows_avoiding_duplicates_notify_status')) + { + include($phpbb_root_path . 'includes/functions_database_helper.' . $phpEx); + } + phpbb_update_rows_avoiding_duplicates_notify_status($db, TOPICS_WATCH_TABLE, 'topic_id', $topic_ids, $to_topic_id); } // Link to the new topic |