diff --git a/checkin_notes b/checkin_notes
index 06811c67f0..b212ddb130 100755
--- a/checkin_notes
+++ b/checkin_notes
@@ -4787,3 +4787,13 @@ David 10 May 2007
lib/
boinc_cmd.C
+
+Rom 10 May 2007
+ - Add a project config.xml option to allow moderators to ban
+ accounts.
+
+ 1
+
+ html/inc/
+ forum.inc
+ forum_moderators.inc
diff --git a/html/inc/forum.inc b/html/inc/forum.inc
index ce51d5dd01..f74065d58c 100644
--- a/html/inc/forum.inc
+++ b/html/inc/forum.inc
@@ -213,6 +213,7 @@ function show_posts($thread, $sort_style, $filter, $logged_in_user, $show_contro
function show_post($post, $thread, $logged_in_user, $n, $controls=FORUM_CONTROLS, $filter=true) {
$user = $post->getOwner();
global $no_forum_rating;
+ global $config;
if ($logged_in_user) {
$tokens = url_tokens($logged_in_user->getAuthenticator());
@@ -311,7 +312,7 @@ function show_post($post, $thread, $logged_in_user, $n, $controls=FORUM_CONTROLS
if ($post->getParentPostID()) echo " - in response to getID()."&nowrap=true#".$post->getParentPostID()."\">Message ID ".$post->getParentPostID().".";
if ($can_edit && $controls != NO_CONTROLS) echo " getID()."$tokens\">[Edit this post]";
- if ($logged_in_user && $logged_in_user->isSpecialUser(S_MODERATOR)) echo post_moderation_links($post,$logged_in_user->isSpecialUser(S_ADMIN),$tokens); //If user is moderator, show links
+ if ($logged_in_user && $logged_in_user->isSpecialUser(S_MODERATOR)) echo post_moderation_links($config,$logged_in_user,$post,$tokens); //If user is moderator, show links
if ($post->getModificationTimestamp()) echo "
Last modified: ", pretty_time_Str($post->getModificationTimestamp());
if ($rated_below_threshold && $filter){
if ($user_is_on_ignorelist) $andtext=" and the user is on your ignore list";
diff --git a/html/inc/forum_moderators.inc b/html/inc/forum_moderators.inc
index 450a7c9ff5..16e0ff674f 100644
--- a/html/inc/forum_moderators.inc
+++ b/html/inc/forum_moderators.inc
@@ -3,7 +3,8 @@
/**
* Show the links for possible moderation actions related to a single post
**/
-function post_moderation_links($post,$admin=0,$tokens){
+function post_moderation_links($config,$logged_in_user,$post,$tokens){
+ $moderators_allowed_to_ban = parse_bool($config, "moderators_allowed_to_ban");
if ($post->isHidden()){
$x = " - getID()."$tokens\">[undelete post]";
@@ -11,7 +12,7 @@ function post_moderation_links($post,$admin=0,$tokens){
$x = " - getID()."$tokens\">[delete post] ";
}
$x.= " - getID()."$tokens\">[move post]";
- if ($admin == 1) {
+ if ($logged_in_user->isSpecialUser(S_ADMIN) || ($logged_in_user->isSpecialUser(S_MODERATOR) && $moderators_allowed_to_ban)) {
$x .= " - getID()."&userid=".$post->getOwnerID()."$tokens>[banish author]";
}
return $x;