aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/phpbb/content_visibility.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php
index 9647095f78..fafb564b79 100644
--- a/phpBB/phpbb/content_visibility.php
+++ b/phpBB/phpbb/content_visibility.php
@@ -240,10 +240,13 @@ class content_visibility
*/
public function get_global_visibility_sql($mode, $exclude_forum_ids = array(), $table_alias = '')
{
+ global $phpbb_dispatcher;
+
$where_sqls = array();
$approve_forums = array_diff(array_keys($this->auth->acl_getf('m_approve', true)), $exclude_forum_ids);
+ $content_replaced = null;
/**
* Allow changing the result of calling get_global_visibility_sql
*
@@ -253,6 +256,7 @@ class content_visibility
* @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 string content_replaced Forces the function to return an implosion of where_sqls (joined by "OR")
* @since 3.1.3-RC1
*/
$vars = array(
@@ -261,8 +265,15 @@ class content_visibility
'forum_ids',
'table_alias',
'approve_forums',
+ 'content_replaced',
);
- extract($this->phpbb_dispatcher->trigger_event('core.phpbb_content_visibility_get_global_visibility_before', compact($vars)));
+ extract($phpbb_dispatcher->trigger_event('core.phpbb_content_visibility_get_global_visibility_before', compact($vars)));
+
+ if ($content_replaced)
+ {
+ return $content_replaced;
+ }
+
if (sizeof($exclude_forum_ids))
{