aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-12-07 18:51:06 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2012-12-07 18:51:06 -0600
commit4ab07aa45ebdf568a252821edf0837e17f1d9f20 (patch)
tree7b62e79a6c52505a104adb0b1ab932e117039d8f
parent8e6a69bf0c936d658deeb3714bc2d38b4b8750c8 (diff)
downloadforums-4ab07aa45ebdf568a252821edf0837e17f1d9f20.tar
forums-4ab07aa45ebdf568a252821edf0837e17f1d9f20.tar.gz
forums-4ab07aa45ebdf568a252821edf0837e17f1d9f20.tar.bz2
forums-4ab07aa45ebdf568a252821edf0837e17f1d9f20.tar.xz
forums-4ab07aa45ebdf568a252821edf0837e17f1d9f20.zip
[ticket/8323] Comments
PHPBB3-8323
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php2
-rw-r--r--phpBB/viewtopic.php21
2 files changed, 16 insertions, 7 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index f6192a3588..3e7ed05fdc 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -1263,7 +1263,7 @@ function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove
}
$db->sql_freeresult($result);
- // print a notice about users not being added who do not want to receive pms
+ // print a notice about users not being added who do not have permission to receive PMs
if ($removed)
{
$error[] = $user->lang['PM_USERS_REMOVED_NO_PERMISSION'];
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 90cb7e9567..f209f61442 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1553,12 +1553,21 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
// Can this user receive a Private Message?
$can_receive_pm = (
- $user_cache[$poster_id]['user_type'] != USER_IGNORE && // They must be a "normal" user
- ($user_cache[$poster_id]['user_type'] != USER_INACTIVE && $user_cache[$poster_id]['user_inactive_reason'] == INACTIVE_MANUAL) && // They must not be deactivated by the administrator
- in_array($poster_id, $can_receive_pm_list) && // They must be able to read PMs
- !in_array($poster_id, $permanently_banned_users) && // They must not be permanently banned
- (($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')) || $data['user_allow_pm']) // They must allow users to contact via PM
- ) ? true : false;
+ // They must be a "normal" user
+ $user_cache[$poster_id]['user_type'] != USER_IGNORE &&
+
+ // They must not be deactivated by the administrator
+ ($user_cache[$poster_id]['user_type'] != USER_INACTIVE && $user_cache[$poster_id]['user_inactive_reason'] == INACTIVE_MANUAL) &&
+
+ // They must be able to read PMs
+ in_array($poster_id, $can_receive_pm_list) &&
+
+ // They must not be permanently banned
+ !in_array($poster_id, $permanently_banned_users) &&
+
+ // They must allow users to contact via PM
+ (($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')) || $data['user_allow_pm'])
+ );
//
$post_row = array(