diff options
author | brunoais <brunoaiss@gmail.com> | 2014-11-29 10:55:53 +0000 |
---|---|---|
committer | brunoais <brunoaiss@gmail.com> | 2014-12-03 13:55:48 +0000 |
commit | 909bb523bf1d7d3d517bf94404e0e4f1707512d7 (patch) | |
tree | 2de6b6cbd82e90021503328cc3965d1ef4ab0dc6 /phpBB/phpbb/content_visibility.php | |
parent | 70483d60886ad416c3dd40f29e1128e031322e1e (diff) | |
download | forums-909bb523bf1d7d3d517bf94404e0e4f1707512d7.tar forums-909bb523bf1d7d3d517bf94404e0e4f1707512d7.tar.gz forums-909bb523bf1d7d3d517bf94404e0e4f1707512d7.tar.bz2 forums-909bb523bf1d7d3d517bf94404e0e4f1707512d7.tar.xz forums-909bb523bf1d7d3d517bf94404e0e4f1707512d7.zip |
[ticket/13146] Allow changing the result of calling get_forums_visibility_sql
PHPBB3-13146
Diffstat (limited to 'phpBB/phpbb/content_visibility.php')
-rw-r--r-- | phpBB/phpbb/content_visibility.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 8bd537586e..cab3d2952d 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -158,6 +158,25 @@ class content_visibility { $where_sql = '('; + /** + * Allow changing the result of calling get_forums_visibility_sql + * + * @event core.phpbb_content_visibility_get_forums_visibility_before + * @var string where_sql The action the user tried to execute + * @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 + * @since 3.1.3-RC1 + */ + $vars = array( + 'where_sql', + 'mode', + 'forum_ids', + 'table_alias', + 'content_replaced', + ); + extract($phpbb_dispatcher->trigger_event('core.phpbb_content_visibility_get_forums_visibility_before', compact($vars))); + $approve_forums = array_intersect($forum_ids, array_keys($this->auth->acl_getf('m_approve', true))); if (sizeof($approve_forums)) |