From 7933287457023c11372ce77bd6a9cf0335042c12 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 29 Apr 2010 15:28:27 +0000 Subject: [PATCH] - user web: no limit on PMs for moderators, admins etc. svn path=/trunk/boinc/; revision=21328 --- checkin_notes | 9 +++++++++ html/inc/forum.inc | 3 ++- html/user/pm.php | 4 +++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index a97a1ce46f..37b56e6706 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3259,3 +3259,12 @@ David 29 Apr 2010 work_fetch.cpp clientgui/ ProxyInfoPage.cpp + +David 29 Apr 2010 + - user web: no limit on PMs for moderators, admins etc. + + html/ + inc/ + forum.inc + user/ + pm.php diff --git a/html/inc/forum.inc b/html/inc/forum.inc index 539c489c73..fd69887c4f 100644 --- a/html/inc/forum.inc +++ b/html/inc/forum.inc @@ -1081,7 +1081,8 @@ function check_reply_access($user, $forum, $thread) { function is_moderator($user, $forum) { if (!$user) return false; - switch ($forum->parent_type) { + $type = $forum?$forum->parent_type:0; + switch ($type) { case 0: if ($user->prefs->privilege(S_MODERATOR)) return true; if ($user->prefs->privilege(S_ADMIN)) return true; diff --git a/html/user/pm.php b/html/user/pm.php index 028ffb3511..06b365a859 100644 --- a/html/user/pm.php +++ b/html/user/pm.php @@ -217,7 +217,9 @@ function do_send($logged_in_user) { } foreach ($userlist as $user) { - check_pm_count($logged_in_user->id); + if (!is_moderator($logged_in_user, null)) { + check_pm_count($logged_in_user->id); + } pm_send($user, $subject, $content, true); }