From 46a189fa4c5ed099eddca5b03f6fd17e057a37c6 Mon Sep 17 00:00:00 2001 From: v12mike Date: Wed, 11 Sep 2019 08:23:21 -0400 Subject: [PATCH] [ticket/9837] Display unapproved posts to originator Fix whitespace issues PHPBB3-9837 --- phpBB/phpbb/content_visibility.php | 10 +++++----- phpBB/viewforum.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 1c69691a2c..276a9d9d23 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -146,11 +146,11 @@ 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'] && - ($this->user->data['user_id'] <> ANONYMOUS) && - ($visibility == ITEM_UNAPPROVED || $visibility == ITEM_REAPPROVE) && + $is_visible = $this->auth->acl_get('m_approve', $forum_id) || + ($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]) ); diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 6b98021e3c..787667fcd7 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -899,8 +899,8 @@ if (count($topic_list)) // Replies $replies = $phpbb_content_visibility->get_count('topic_posts', $row, $topic_forum_id) - 1; - //correct for case of unapproved topic visible to poster - a bit dirty but efficient - if ($replies < 0) + //correct for case of unapproved topic visible to poster - a bit dirty but efficient + if ($replies < 0) { $replies = 0; }