aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/content_visibility.php
diff options
context:
space:
mode:
authorbrunoais <brunoaiss@gmail.com>2014-11-29 10:56:21 +0000
committerbrunoais <brunoaiss@gmail.com>2014-12-03 13:55:49 +0000
commit0388d82504b672aa34a23baa2d0c2804c038caa2 (patch)
tree9b670b983ad95ae0751254f3a573a318a78232e9 /phpBB/phpbb/content_visibility.php
parent909bb523bf1d7d3d517bf94404e0e4f1707512d7 (diff)
downloadforums-0388d82504b672aa34a23baa2d0c2804c038caa2.tar
forums-0388d82504b672aa34a23baa2d0c2804c038caa2.tar.gz
forums-0388d82504b672aa34a23baa2d0c2804c038caa2.tar.bz2
forums-0388d82504b672aa34a23baa2d0c2804c038caa2.tar.xz
forums-0388d82504b672aa34a23baa2d0c2804c038caa2.zip
[ticket/13146] Adding $content_replaced to allow even more flexibility
PHPBB3-13146
Diffstat (limited to 'phpBB/phpbb/content_visibility.php')
-rw-r--r--phpBB/phpbb/content_visibility.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php
index cab3d2952d..66cd7a8c86 100644
--- a/phpBB/phpbb/content_visibility.php
+++ b/phpBB/phpbb/content_visibility.php
@@ -158,6 +158,7 @@ class content_visibility
{
$where_sql = '(';
+ $content_replaced = false;
/**
* Allow changing the result of calling get_forums_visibility_sql
*
@@ -166,6 +167,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 bool content_replaced Forces the function to return where_sql after executing the event
* @since 3.1.3-RC1
*/
$vars = array(
@@ -177,6 +179,11 @@ class content_visibility
);
extract($phpbb_dispatcher->trigger_event('core.phpbb_content_visibility_get_forums_visibility_before', compact($vars)));
+ if ($contentReplaced)
+ {
+ return $content_replaced;
+ }
+
$approve_forums = array_intersect($forum_ids, array_keys($this->auth->acl_getf('m_approve', true)));
if (sizeof($approve_forums))