mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Merge branch 'develop-olympus' of github.com:phpbb/phpbb3 into ticket/8610
# By Oleg Pudeyev (29) and others # Via Andreas Fischer (3) and others * 'develop-olympus' of github.com:phpbb/phpbb3: (36 commits) [ticket/11262] Add .lock in cache directory to .gitignore [ticket/11265] Add assertions for board installation success. [ticket/11162] Reformat. [ticket/10491] Make recreate_database static. [ticket/11162] Rename tricky updates to database helper. [ticket/10491] Install board once per test run. [ticket/10972] Drop user deletion. [ticket/10972] Tweak user addition. [ticket/10972] Add destroy method to mock cache. [ticket/10972] Add mock null cache. [ticket/10972] Backport get_db from develop. [ticket/10972] Added explicit checks for creating duplicate users. [ticket/10972] Moved tests into appropriate places and added comments [ticket/10972] Added methods for creating and deleting basic users [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. ... Conflicts: phpBB/includes/mcp/mcp_topic.php
This commit is contained in:
@@ -414,19 +414,15 @@ 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));
|
||||
|
||||
// If the topic no longer exist, we will update the bookmarks table.
|
||||
if (!function_exists('phpbb_update_rows_avoiding_duplicates'))
|
||||
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);
|
||||
|
||||
// If the topic no longer exist, we will update the bookmarks table.
|
||||
phpbb_update_rows_avoiding_duplicates($db, BOOKMARKS_TABLE, 'topic_id', $topic_ids, $to_topic_id);
|
||||
|
||||
// Link to the new topic
|
||||
|
@@ -662,13 +662,13 @@ 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);
|
||||
if (!function_exists('phpbb_update_rows_avoiding_duplicates_notify_status'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_database_helper.' . $phpEx);
|
||||
}
|
||||
|
||||
$db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE topic_id = ' . (int) $topic_id);
|
||||
// If the topic no longer exist, we will update the topic watch table.
|
||||
phpbb_update_rows_avoiding_duplicates_notify_status($db, TOPICS_WATCH_TABLE, 'topic_id', $topic_ids, $to_topic_id);
|
||||
|
||||
// If the topic no longer exist, we will update the bookmarks table.
|
||||
phpbb_update_rows_avoiding_duplicates($db, BOOKMARKS_TABLE, 'topic_id', $topic_id, $to_topic_id);
|
||||
|
Reference in New Issue
Block a user