aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/content_visibility.php
diff options
context:
space:
mode:
authorbrunoais <brunoaiss@gmail.com>2014-11-29 11:27:57 +0000
committerbrunoais <brunoaiss@gmail.com>2014-12-03 13:55:50 +0000
commite596d0b6cef2a59aedaf9f20cdbf3d5f1ab46a9b (patch)
tree287c0cb0520973c6de856a9ead93ff9348c30fca /phpBB/phpbb/content_visibility.php
parent0388d82504b672aa34a23baa2d0c2804c038caa2 (diff)
downloadforums-e596d0b6cef2a59aedaf9f20cdbf3d5f1ab46a9b.tar
forums-e596d0b6cef2a59aedaf9f20cdbf3d5f1ab46a9b.tar.gz
forums-e596d0b6cef2a59aedaf9f20cdbf3d5f1ab46a9b.tar.bz2
forums-e596d0b6cef2a59aedaf9f20cdbf3d5f1ab46a9b.tar.xz
forums-e596d0b6cef2a59aedaf9f20cdbf3d5f1ab46a9b.zip
[ticket/13147] Adding $approve_forums to the list of the event's variables
PHPBB3-13147
Diffstat (limited to 'phpBB/phpbb/content_visibility.php')
-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