aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorv12mike <github@ingenious.co.nz>2019-10-06 09:43:45 -0400
committerMarc Alexander <admin@m-a-styles.de>2019-11-21 13:44:21 +0100
commit15da5b108e6b93fd0059b1b523b68eccec1cce5c (patch)
treef69349293d086323a04414959c9d9624e7c67989
parent63ebd658a947143788f83014c6e90b4eb3baa985 (diff)
downloadforums-15da5b108e6b93fd0059b1b523b68eccec1cce5c.tar
forums-15da5b108e6b93fd0059b1b523b68eccec1cce5c.tar.gz
forums-15da5b108e6b93fd0059b1b523b68eccec1cce5c.tar.bz2
forums-15da5b108e6b93fd0059b1b523b68eccec1cce5c.tar.xz
forums-15da5b108e6b93fd0059b1b523b68eccec1cce5c.zip
[ticket/9837] Display unapproved posts to their authors
Re-order code for efficiency PHPBB3-9837
-rw-r--r--phpBB/phpbb/content_visibility.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php
index 276a9d9d23..bea49c0be1 100644
--- a/phpBB/phpbb/content_visibility.php
+++ b/phpBB/phpbb/content_visibility.php
@@ -146,13 +146,12 @@ class content_visibility
{
$visibility = $data[$mode . '_visibility'];
$poster_key = ($mode === 'topic') ? 'topic_poster' : 'poster_id';
- $is_visible = $this->auth->acl_get('m_approve', $forum_id) ||
- ($visibility == ITEM_APPROVED) ||
- ($this->config['display_unapproved_posts'] &&
+ $is_visible = ($visibility == ITEM_APPROVED) ||
+ ($this->config['display_unapproved_posts'] &&
($this->user->data['user_id'] <> ANONYMOUS) &&
($visibility == ITEM_UNAPPROVED || $visibility == ITEM_REAPPROVE) &&
- ($this->user->data['user_id'] === $data[$poster_key])
- );
+ ($this->user->data['user_id'] === $data[$poster_key])) ||
+ $this->auth->acl_get('m_approve', $forum_id);
/**
* Allow changing the result of calling is_visible