aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_forum.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-12-20 22:51:38 +0100
committerJoas Schilling <nickvergessen@gmx.de>2012-12-20 22:51:38 +0100
commite34b8ed094affdaedbf457406c98b29c125e5d8b (patch)
tree7cc51ba4ead71cb48a76747770edf622f8fe85f9 /phpBB/includes/mcp/mcp_forum.php
parent70a409d4b5411bf9e50a70d1cf3855b686304bbe (diff)
parentd11829567603e6ac37170b919efc4659b2be20cb (diff)
downloadforums-e34b8ed094affdaedbf457406c98b29c125e5d8b.tar
forums-e34b8ed094affdaedbf457406c98b29c125e5d8b.tar.gz
forums-e34b8ed094affdaedbf457406c98b29c125e5d8b.tar.bz2
forums-e34b8ed094affdaedbf457406c98b29c125e5d8b.tar.xz
forums-e34b8ed094affdaedbf457406c98b29c125e5d8b.zip
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into feature/softdelete-1-permission-rebase
* 'develop' of https://github.com/phpbb/phpbb3: (544 commits) [feature/events] Fix improperly named event in documentation [feature/events] Fix alphabetization of events [feature/events] Put events in alphabetical order [feature/events] Make EVENTS.md lowercase [ticket/11285] Use more granularity in dependency checks in compress test [ticket/10880] The m_approve permisson no longer implies f_noapprove. [ticket/10803] Show failure message until user dismisses it [ticket/10954] Add missing semi-colon [ticket/10954] Make sure to mark subforums unread and add small fixes [feature/events] Use ` to escape HTML tags in markdown [feature/events] Remove HTML tags from markdown so they don't get parsed [ticket/10954] Miscellaneous coding fixes [feature/events] Remove extraneous space [feature/events] Add markdown template event documentation file [feature/events] forumlist_body_last_post_title_after -> _prepend (subsilver2) [feature/events] Fix overall_footer_end -> overall_footer_after (subsilver2) [feature/events] Fix typo in event name [ticket/10763] Use self when calling get_extension() in filespec class [feature/events] Fix more subsilver2 events [feature/events] Fix some subsilver2 events ... Conflicts: phpBB/install/database_update.php phpBB/posting.php
Diffstat (limited to 'phpBB/includes/mcp/mcp_forum.php')
-rw-r--r--phpBB/includes/mcp/mcp_forum.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php
index 5fb9710eed..ddd27a1be2 100644
--- a/phpBB/includes/mcp/mcp_forum.php
+++ b/phpBB/includes/mcp/mcp_forum.php
@@ -436,13 +436,16 @@ 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);
+ if (!function_exists('phpbb_update_rows_avoiding_duplicates_notify_status'))
+ {
+ include($phpbb_root_path . 'includes/functions_database_helper.' . $phpEx);
+ }
+
+ // Update the topic watch table.
+ phpbb_update_rows_avoiding_duplicates_notify_status($db, TOPICS_WATCH_TABLE, 'topic_id', $topic_ids, $to_topic_id);
- $db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids));
+ // Update the bookmarks table.
+ phpbb_update_rows_avoiding_duplicates($db, BOOKMARKS_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>');