aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_forum.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-12-15 10:18:38 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2012-12-15 10:18:38 -0600
commit7cf673f0dbdc689eedf0c515f08c6739bc463866 (patch)
tree4075fc193299f05a2032b326a1e47adfed31fd3e /phpBB/includes/mcp/mcp_forum.php
parentbec05a11f38cd57d7e7a6c7f64ecdb7351e24fc0 (diff)
parent762cb074c330480340a6c14abb37e82a1ff8b09d (diff)
downloadforums-7cf673f0dbdc689eedf0c515f08c6739bc463866.tar
forums-7cf673f0dbdc689eedf0c515f08c6739bc463866.tar.gz
forums-7cf673f0dbdc689eedf0c515f08c6739bc463866.tar.bz2
forums-7cf673f0dbdc689eedf0c515f08c6739bc463866.tar.xz
forums-7cf673f0dbdc689eedf0c515f08c6739bc463866.zip
Merge branch 'develop' of github.com:phpbb/phpbb3 into ticket/11103
# By Oleg Pudeyev (20) and others # Via Andreas Fischer (3) and Oleg Pudeyev (2) * 'develop' of github.com:phpbb/phpbb3: (33 commits) [ticket/11268] Delete phpbb_db_driver_mysql4 as there is no such thing. [ticket/11250] Use user defined message as incomplete message [ticket/11250] Add tests for simple nesting and code [ticket/11250] Run tests by default and add an option for incomplete ones [ticket/11250] Fix parsing result with special chars [ticket/11250] Add tests for size and attachment [ticket/11250] Fix method names [ticket/11250] Add some comments and fix a description [ticket/11250] Add some more tests for quotes [ticket/11250] Move quote special cases from class to unit tests [ticket/11250] Add parsing tests for our basic bbcodes in simple cases [ticket/11162] Reformat. [ticket/11162] Rename tricky updates to database helper. [ticket/11162] Use empty($queries). [ticket/11162] Review comments fixed. [ticket/11162] Reformat. [ticket/11162] Newlines to LF. [ticket/11162] Use correct functions. [ticket/11162] Account for notify_status. [ticket/11162] This test really only works for bookmarks. ...
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>');