mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/15266] Expand functionality of content_visibility
Added new function "is_visible", and replaced several immediate uses of the above, including a single event in the new function to handle change in all places consistently, and much simpler. PHPBB3-15266
This commit is contained in:
@@ -262,7 +262,7 @@ if (!$topic_data)
|
||||
$forum_id = (int) $topic_data['forum_id'];
|
||||
|
||||
// Now we know the forum_id and can check the permissions
|
||||
if ($topic_data['topic_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $forum_id))
|
||||
if (!$phpbb_content_visibility->is_visible('topic', $forum_id, $topic_data))
|
||||
{
|
||||
trigger_error('NO_TOPIC');
|
||||
}
|
||||
|
Reference in New Issue
Block a user