mirror of https://github.com/BOINC/boinc.git
- Add a project config.xml option to allow moderators to ban
accounts. <moderators_allowed_to_ban>1</moderators_allowed_to_ban> html/inc/ forum.inc forum_moderators.inc svn path=/trunk/boinc/; revision=12643
This commit is contained in:
parent
91a5a79c59
commit
2e944052a6
|
@ -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.
|
||||
|
||||
<moderators_allowed_to_ban>1</moderators_allowed_to_ban>
|
||||
|
||||
html/inc/
|
||||
forum.inc
|
||||
forum_moderators.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 <a href=\"forum_thread.php?id=".$thread->getID()."&nowrap=true#".$post->getParentPostID()."\">Message ID ".$post->getParentPostID()."</a>.";
|
||||
if ($can_edit && $controls != NO_CONTROLS) echo " <a href=\"forum_edit.php?id=".$post->getID()."$tokens\">[Edit this post]</a>";
|
||||
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 "<br>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";
|
||||
|
|
|
@ -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 = " - <a href=\"forum_moderate_post_action.php?action=unhide&id=".$post->getID()."$tokens\">[undelete post]</a>";
|
||||
|
@ -11,7 +12,7 @@ function post_moderation_links($post,$admin=0,$tokens){
|
|||
$x = " - <a href=\"forum_moderate_post.php?action=hide&id=".$post->getID()."$tokens\">[delete post]</a> ";
|
||||
}
|
||||
$x.= " - <a href=\"forum_moderate_post.php?action=move&id=".$post->getID()."$tokens\">[move post]</a>";
|
||||
if ($admin == 1) {
|
||||
if ($logged_in_user->isSpecialUser(S_ADMIN) || ($logged_in_user->isSpecialUser(S_MODERATOR) && $moderators_allowed_to_ban)) {
|
||||
$x .= " - <a href=forum_moderate_post.php?action=banish_user&id=".$post->getID()."&userid=".$post->getOwnerID()."$tokens>[banish author]</a>";
|
||||
}
|
||||
return $x;
|
||||
|
|
Loading…
Reference in New Issue