aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_front.php
diff options
context:
space:
mode:
authorbrunoais <brunoaiss@gmail.com>2015-03-01 19:56:50 +0000
committerbrunoais <brunoaiss@gmail.com>2015-03-01 20:26:12 +0000
commit5fa6871ebf486eb70052c2e5a07b96d6b23d88c0 (patch)
tree120bb5aa3fab7415afb7f7b598c6359a10f07a33 /phpBB/includes/mcp/mcp_front.php
parent5ad69bbecf49522734c340356f5d9e8303720a9c (diff)
downloadforums-5fa6871ebf486eb70052c2e5a07b96d6b23d88c0.tar
forums-5fa6871ebf486eb70052c2e5a07b96d6b23d88c0.tar.gz
forums-5fa6871ebf486eb70052c2e5a07b96d6b23d88c0.tar.bz2
forums-5fa6871ebf486eb70052c2e5a07b96d6b23d88c0.tar.xz
forums-5fa6871ebf486eb70052c2e5a07b96d6b23d88c0.zip
[ticket/13664] Add event to allow changing number of unapproved posts listed
PHPBB3-13664
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 81960e5cd2..41953a71e6 100644
--- a/phpBB/includes/mcp/mcp_front.php
+++ b/phpBB/includes/mcp/mcp_front.php
@@ -49,6 +49,18 @@ function mcp_front_view($id, $mode, $action)
'WHERE' => $db->sql_in_set('forum_id', $forum_list) . '
AND ' . $db->sql_in_set('post_visibility', array(ITEM_UNAPPROVED, ITEM_REAPPROVE))
);
+
+ /**
+ * Allow altering the query to get the number of unapproved posts
+ *
+ * @event core.mcp_front_queue_unapproved_total_before
+ * @var int sql_ary Query to get the total number of unapproved posts
+ * @var array forum_list List of forums to look for unapproved posts
+ * @since 3.1.4-RC1
+ */
+ $vars = array('sql_ary', 'forum_list');
+ extract($phpbb_dispatcher->trigger_event('core.mcp_front_queue_unapproved_total_before', compact($vars)));
+
$sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
$total = (int) $db->sql_fetchfield('total');