From 91eccc708bb0ca4143ad670be6ecddef818b9316 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 8 Aug 2013 13:42:51 +0200 Subject: [ticket/11775] Fix error when moving the last post to another topic PHPBB3-11775 --- phpBB/includes/mcp/mcp_topic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/mcp') diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 76985488b7..8e0e89e3da 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -668,10 +668,10 @@ function merge_posts($topic_id, $to_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); + phpbb_update_rows_avoiding_duplicates_notify_status($db, TOPICS_WATCH_TABLE, 'topic_id', array($topic_id), $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); + phpbb_update_rows_avoiding_duplicates($db, BOOKMARKS_TABLE, 'topic_id', array($topic_id), $to_topic_id); } // Link to the new topic -- cgit v1.2.1 From 77845e366e8a5578ad740186cf71d75be32694bc Mon Sep 17 00:00:00 2001 From: rechosen Date: Wed, 4 Sep 2013 13:37:39 +0200 Subject: [ticket/11829] Use report_closed to determine status in MCP report_details Instead of using post_reported of the post or message_reported of the pm, use report_closed of the report itself to reliably determine whether this particular report is closed or not in the report_details view of the MCP. This fixes a bug where the report_details view would not show that the report shown was closed and display a "Close report" button that had no effect. PHPBB3-11829 --- phpBB/includes/mcp/mcp_pm_reports.php | 1 + phpBB/includes/mcp/mcp_reports.php | 1 + 2 files changed, 2 insertions(+) (limited to 'phpBB/includes/mcp') diff --git a/phpBB/includes/mcp/mcp_pm_reports.php b/phpBB/includes/mcp/mcp_pm_reports.php index 77bc7680e6..0a33c80a90 100644 --- a/phpBB/includes/mcp/mcp_pm_reports.php +++ b/phpBB/includes/mcp/mcp_pm_reports.php @@ -166,6 +166,7 @@ class mcp_pm_reports 'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=pm_reports&mode=pm_report_details&r=' . $report_id), 'S_CAN_VIEWIP' => $auth->acl_getf_global('m_info'), 'S_POST_REPORTED' => $pm_info['message_reported'], + 'S_REPORT_CLOSED' => $report['report_closed'], 'S_USER_NOTES' => true, 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=pm_reports&mode=pm_report_details&r=' . $report_id), diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index def5422be2..b13c8b20c6 100644 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -192,6 +192,7 @@ class mcp_reports 'S_POST_REPORTED' => $post_info['post_reported'], 'S_POST_UNAPPROVED' => !$post_info['post_approved'], 'S_POST_LOCKED' => $post_info['post_edit_locked'], + 'S_REPORT_CLOSED' => $report['report_closed'], 'S_USER_NOTES' => true, 'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '', -- cgit v1.2.1