aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-05-08 00:17:10 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-05-08 00:17:10 +0200
commit1e28748c0c4024960df0bb89a5ba6e3510b4b471 (patch)
treebd481212fa464f09c1661a63900cfea01e3c328a
parenta8c033f655e1fab0d0b0336f7324d07ea4f5c7df (diff)
parent603726371c07bde9a8c34f8f98eb51d15932aac3 (diff)
downloadforums-1e28748c0c4024960df0bb89a5ba6e3510b4b471.tar
forums-1e28748c0c4024960df0bb89a5ba6e3510b4b471.tar.gz
forums-1e28748c0c4024960df0bb89a5ba6e3510b4b471.tar.bz2
forums-1e28748c0c4024960df0bb89a5ba6e3510b4b471.tar.xz
forums-1e28748c0c4024960df0bb89a5ba6e3510b4b471.zip
Merge pull request #3455 from brunoais/ticket/13660
[ticket/13660] Allow changing the query for total reports in mcp_front
-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..65b27f6b88 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.5-RC1
+ */
+ $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);