diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-12-14 02:55:07 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-12-14 02:55:07 +0100 |
commit | f4df152b4b88d2c7e2866cc829059781d2aea437 (patch) | |
tree | cc337fc0493088a80bbab4740f8529f5b6a38236 /phpBB/includes/mcp/mcp_topic.php | |
parent | 73e7fa8e8ee9c2db7874dbe18605d3a0aa59b86f (diff) | |
parent | a686910958c0ca6eb64c7be10d60d1ebe15999c9 (diff) | |
download | forums-f4df152b4b88d2c7e2866cc829059781d2aea437.tar forums-f4df152b4b88d2c7e2866cc829059781d2aea437.tar.gz forums-f4df152b4b88d2c7e2866cc829059781d2aea437.tar.bz2 forums-f4df152b4b88d2c7e2866cc829059781d2aea437.tar.xz forums-f4df152b4b88d2c7e2866cc829059781d2aea437.zip |
Merge remote-tracking branch 'p/ticket/11162' into develop-olympus
* p/ticket/11162: (22 commits)
[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.
[ticket/11162] The test is not at all trivial.
[ticket/11162] Add includes.
[ticket/11162] Move to a separate file to avoid blowing out functions.php.
[ticket/11162] No whitespace changes in olympus.
[ticket/11162] Fix inaccurately copy pasted comment.
[ticket/11162] Use phpbb_update_rows_avoiding_duplicates in mcp.
[ticket/11162] Clarify that only the two tables actually work.
[ticket/11162] Uncomment transactions.
[ticket/11162] An implementation that actually works.
[ticket/11162] Make count function upper case.
[ticket/11162] Rename count variable name to remaining_rows.
...
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 7d4edaf362..66d0c7a47e 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -620,12 +620,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 |