aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/content_visibility.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php
index 66cd7a8c86..dcf32f8f58 100644
--- a/phpBB/phpbb/content_visibility.php
+++ b/phpBB/phpbb/content_visibility.php
@@ -158,6 +158,8 @@ class content_visibility
{
$where_sql = '(';
+ $approve_forums = array_intersect($forum_ids, array_keys($this->auth->acl_getf('m_approve', true)));
+
$content_replaced = false;
/**
* Allow changing the result of calling get_forums_visibility_sql
@@ -167,6 +169,7 @@ class content_visibility
* @var string mode Either "topic" or "post" depending on the query this is being used in
* @var array forum_ids Array of forum ids which the posts/topics are limited to
* @var string table_alias Table alias to prefix in SQL queries
+ * @var array approve_forums Array of forums where the user has m_approve permissions
* @var bool content_replaced Forces the function to return where_sql after executing the event
* @since 3.1.3-RC1
*/
@@ -175,6 +178,7 @@ class content_visibility
'mode',
'forum_ids',
'table_alias',
+ 'approve_forums',
'content_replaced',
);
extract($phpbb_dispatcher->trigger_event('core.phpbb_content_visibility_get_forums_visibility_before', compact($vars)));
@@ -184,8 +188,6 @@ class content_visibility
return $content_replaced;
}
- $approve_forums = array_intersect($forum_ids, array_keys($this->auth->acl_getf('m_approve', true)));
-
if (sizeof($approve_forums))
{
// Remove moderator forums from the rest