From 4cdcb6d5d347eccead34853c011083b519922da8 Mon Sep 17 00:00:00 2001 From: brunoais Date: Thu, 5 Mar 2015 16:48:10 +0000 Subject: [PATCH 1/3] [ticket/13672] Allow changing the data from the user-submitted report PHPBB3-13672 --- phpBB/includes/mcp/mcp_reports.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 856c8794e2..f6acec31e3 100644 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -94,6 +94,26 @@ class mcp_reports $report = $db->sql_fetchrow($result); $db->sql_freeresult($result); + /** + * Allow changing the data obtained from the user-submitted report. + * + * @event core.mcp_reports_report_details_query_after + * @var array sql_ary The array in the format of the query builder with the query that had been executted + * @var mixed forum_id The forum_id, the number in the f GET parameter + * @var int post_id The post_id of the report being viewed (if 0, it is meaningless) + * @var int report_id The report_id of the report being viewed + * @var int report The query's resulting row. + * @since 3.1.4-RC1 + */ + $vars = array( + 'sql_ary', + 'forum_id', + 'post_id', + 'report_id', + 'report', + ); + extract($phpbb_dispatcher->trigger_event('core.mcp_reports_report_details_query_after', compact($vars))); + if (!$report) { trigger_error('NO_REPORT'); From 9833eb4f1390624279ff6c0022db01480f72383f Mon Sep 17 00:00:00 2001 From: brunoais Date: Wed, 6 May 2015 23:00:26 +0100 Subject: [PATCH 2/3] [ticket/13672] BUMP version to 3.1.5-dev PHPBB3-13672 --- phpBB/includes/mcp/mcp_reports.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index f6acec31e3..5c42e6b810 100644 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -103,7 +103,7 @@ class mcp_reports * @var int post_id The post_id of the report being viewed (if 0, it is meaningless) * @var int report_id The report_id of the report being viewed * @var int report The query's resulting row. - * @since 3.1.4-RC1 + * @since 3.1.5-RC1 */ $vars = array( 'sql_ary', From 4119be5a3db462bdc45acf91a8d55d3129490f6f Mon Sep 17 00:00:00 2001 From: brunoais Date: Fri, 8 May 2015 10:43:48 +0100 Subject: [PATCH 3/3] [ticket/13672] Removed bogus sting concatenation PHPBB3-13672 --- phpBB/includes/mcp/mcp_reports.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 5c42e6b810..3cbb931820 100644 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -82,7 +82,7 @@ class mcp_reports USERS_TABLE => 'u', ), - 'WHERE' => '' . (($report_id) ? 'r.report_id = ' . $report_id : "r.post_id = $post_id") . ' + 'WHERE' => (($report_id) ? 'r.report_id = ' . $report_id : "r.post_id = $post_id") . ' AND rr.reason_id = r.reason_id AND r.user_id = u.user_id AND r.pm_id = 0',