aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_forum.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-12-15 18:25:51 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2012-12-15 18:25:51 -0600
commitc9ca7051491143e3c0da43663e85b60e18c6740e (patch)
treeec10169c1d5737f2e48eac0f6997fd6e55716049 /phpBB/includes/mcp/mcp_forum.php
parentd0375c46f91eb88508cbd8e320c7eda78d4f01dd (diff)
parent95bd4d73eb41d677470b0bf77c521ae2a9bb731e (diff)
downloadforums-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_forum.php')
-rw-r--r--phpBB/includes/mcp/mcp_forum.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php
index 4dd5e5856a..4ef4b75855 100644
--- a/phpBB/includes/mcp/mcp_forum.php
+++ b/phpBB/includes/mcp/mcp_forum.php
@@ -430,13 +430,12 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
// Message and return links
$success_msg = 'POSTS_MERGED_SUCCESS';
- // 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 ' . $db->sql_in_set('topic_id', $topic_ids));
- $db->sql_return_on_error(false);
-
- $db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
+ // Update the topic watch table.
+ 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
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');