aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2018-02-21 21:14:00 +0100
committerMarc Alexander <admin@m-a-styles.de>2018-02-21 21:14:00 +0100
commitf17bd9e1e0c9e01b892cbe18fb3f811c16f43508 (patch)
tree71660a1ca1f24bcc3c318e16cba192a156cf0c8e /phpBB/viewtopic.php
parent1c920859dbecd12f1ad12b96249a39e4fa155a91 (diff)
parentf01e29effe5bf053ac5205e47f8e0e90a262315a (diff)
downloadforums-f17bd9e1e0c9e01b892cbe18fb3f811c16f43508.tar
forums-f17bd9e1e0c9e01b892cbe18fb3f811c16f43508.tar.gz
forums-f17bd9e1e0c9e01b892cbe18fb3f811c16f43508.tar.bz2
forums-f17bd9e1e0c9e01b892cbe18fb3f811c16f43508.tar.xz
forums-f17bd9e1e0c9e01b892cbe18fb3f811c16f43508.zip
Merge pull request #5094 from JoshyPHP/ticket/15518
[ticket/15518] Add a setting to toggle permission checks for pms in viewtopic
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php18
1 files changed, 13 insertions, 5 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 155dca7788..3c25c3b037 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1576,12 +1576,20 @@ if (count($attach_list))
}
}
-// Get the list of users who can receive private messages
-$can_receive_pm_list = $auth->acl_get_list(array_keys($user_cache), 'u_readpm');
-$can_receive_pm_list = (empty($can_receive_pm_list) || !isset($can_receive_pm_list[0]['u_readpm'])) ? array() : $can_receive_pm_list[0]['u_readpm'];
+if ($config['enable_accurate_pm_button'])
+{
+ // Get the list of users who can receive private messages
+ $can_receive_pm_list = $auth->acl_get_list(array_keys($user_cache), 'u_readpm');
+ $can_receive_pm_list = (empty($can_receive_pm_list) || !isset($can_receive_pm_list[0]['u_readpm'])) ? array() : $can_receive_pm_list[0]['u_readpm'];
-// Get the list of permanently banned users
-$permanently_banned_users = phpbb_get_banned_user_ids(array_keys($user_cache), false);
+ // Get the list of permanently banned users
+ $permanently_banned_users = phpbb_get_banned_user_ids(array_keys($user_cache), false);
+}
+else
+{
+ $can_receive_pm_list = array_keys($user_cache);
+ $permanently_banned_users = [];
+}
$i_total = count($rowset) - 1;
$prev_post_id = '';