From f7575b3a0ce73157b4e2d14c07f4e99b53aade27 Mon Sep 17 00:00:00 2001 From: Ruslan Uzdenov Date: Sun, 17 Jan 2010 16:49:23 +0000 Subject: [PATCH] Fix bug #56555 - Quick reply + posting permission Authorised by: ToonArmy git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10414 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/viewtopic.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 5226f6fb39..3b89c1f454 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -131,6 +131,7 @@
  • [Fix] Pagination of User Notes in MCP uses two different config values. (Bug #56025)
  • [Fix] List hidden groups on viewprofile where the viewing user is also a member. (Bug #31845)
  • [Fix] Sort viewprofile group list by group name.
  • +
  • [Fix] Correctly determine permissions to show quick reply button. (Bug #56555)
  • [Fix] Do not unsubscribe users from topics replying with quickreply. (Bug #56235)
  • [Fix] Don't submit when pressing enter on preview button. (Bug #54395)
  • [Change] Move redirect into a hidden field to avoid issues with mod_security. (Bug #54145)
  • diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 93c1f99f0e..8f42342a87 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1678,8 +1678,12 @@ else if (!$all_marked_read) } // let's set up quick_reply -$s_allowed_reply = ((!$auth->acl_get('f_reply', $forum_id) || ($topic_data['forum_status'] == ITEM_LOCKED) || ($topic_data['topic_status'] == ITEM_LOCKED)) && !$auth->acl_get('m_edit', $forum_id)) ? false : true; -$s_quick_reply = $s_allowed_reply && $user->data['is_registered'] && $config['allow_quick_reply'] && ($topic_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY); +$s_quick_reply = false; +if ($user->data['is_registered'] && $config['allow_quick_reply'] && ($topic_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY) && $auth->acl_get('f_reply', $forum_id)) +{ + // Quick reply enabled forum + $s_quick_reply = (($topic_data['forum_status'] == ITEM_UNLOCKED && $topic_data['topic_status'] == ITEM_UNLOCKED) || $auth->acl_get('m_edit', $forum_id)) ? true : false; +} if ($s_can_vote || $s_quick_reply) {