aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_front.php
diff options
context:
space:
mode:
authorbrunoais <brunoaiss@gmail.com>2015-02-28 08:45:34 +0000
committerbrunoais <brunoaiss@gmail.com>2015-02-28 08:57:43 +0000
commit8b23272c3363fa7bd83f4e6831929b4336ecf55b (patch)
tree17d09d82d8470cec48e0b375c0e79f3f803d989c /phpBB/includes/mcp/mcp_front.php
parent18de60c0e099c2af41d853cfeb5799a09e0da630 (diff)
downloadforums-8b23272c3363fa7bd83f4e6831929b4336ecf55b.tar
forums-8b23272c3363fa7bd83f4e6831929b4336ecf55b.tar.gz
forums-8b23272c3363fa7bd83f4e6831929b4336ecf55b.tar.bz2
forums-8b23272c3363fa7bd83f4e6831929b4336ecf55b.tar.xz
forums-8b23272c3363fa7bd83f4e6831929b4336ecf55b.zip
[ticket/13660] Allow changing the query for total reports in mcp_front
PHPBB3-13660
Diffstat (limited to 'phpBB/includes/mcp/mcp_front.php')
-rw-r--r--phpBB/includes/mcp/mcp_front.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php
index 500db55456..145ac16ff4 100644
--- a/phpBB/includes/mcp/mcp_front.php
+++ b/phpBB/includes/mcp/mcp_front.php
@@ -157,6 +157,18 @@ function mcp_front_view($id, $mode, $action)
AND r.pm_id = 0
AND r.report_closed = 0
AND ' . $db->sql_in_set('p.forum_id', $forum_list);
+
+ /**
+ * Alter sql query to count the number of reported posts
+ *
+ * @event core.mcp_front_reports_count_query_before
+ * @var int sql The query string used to get the number of reports that exist
+ * @var array forum_list List of forums that contain the posts
+ * @since 3.1.0-RC3
+ */
+ $vars = array('sql', 'forum_list');
+ extract($phpbb_dispatcher->trigger_event('core.mcp_front_reports_count_query_before', compact($vars)));
+
$result = $db->sql_query($sql);
$total = (int) $db->sql_fetchfield('total');
$db->sql_freeresult($result);