aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-11-26 15:31:12 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-11-26 15:31:12 +0000
commit4d6f84c3208c0d941d3b786a1c60682e9c20193f (patch)
tree1df8f6dd18fd96a0cf977dac17ca4be3ab416bf3 /phpBB/viewtopic.php
parent9fa4f1f012a70ee2a225b048e6e57bdfeb5734b8 (diff)
downloadforums-4d6f84c3208c0d941d3b786a1c60682e9c20193f.tar
forums-4d6f84c3208c0d941d3b786a1c60682e9c20193f.tar.gz
forums-4d6f84c3208c0d941d3b786a1c60682e9c20193f.tar.bz2
forums-4d6f84c3208c0d941d3b786a1c60682e9c20193f.tar.xz
forums-4d6f84c3208c0d941d3b786a1c60682e9c20193f.zip
fix for bug #5586
git-svn-id: file:///svn/phpbb/trunk@6662 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index fa28b568b8..d7ef0697c1 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -984,6 +984,7 @@ while ($row = $db->sql_fetchrow($result))
'user_colour' => $row['user_colour'],
'warnings' => 0,
+ 'allow_pm' => 0,
);
}
else
@@ -1008,6 +1009,7 @@ while ($row = $db->sql_fetchrow($result))
'sig_bbcode_bitfield' => (!empty($row['user_sig_bbcode_bitfield'])) ? $row['user_sig_bbcode_bitfield'] : '',
'viewonline' => $row['user_allow_viewonline'],
+ 'allow_pm' => $row['user_allow_pm'],
'avatar' => '',
'age' => '',
@@ -1419,7 +1421,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'U_PROFILE' => $user_cache[$poster_id]['profile'],
'U_SEARCH' => $user_cache[$poster_id]['search'],
- 'U_PM' => ($poster_id != ANONYMOUS && $config['allow_privmsg'] && $auth->acl_get('u_sendpm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;action=quotepost&amp;p=' . $row['post_id']) : '',
+ 'U_PM' => ($poster_id != ANONYMOUS && $config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_cache[$poster_id]['allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;action=quotepost&amp;p=' . $row['post_id']) : '',
'U_EMAIL' => $user_cache[$poster_id]['email'],
'U_WWW' => $user_cache[$poster_id]['www'],
'U_ICQ' => $user_cache[$poster_id]['icq'],