mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=11289
This commit is contained in:
parent
cd179397f0
commit
44435b0191
|
@ -295,7 +295,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()."\">[Edit this post]</a>";
|
||||
if ($logged_in_user && $logged_in_user->isSpecialUser(S_MODERATOR)) echo post_moderation_links($post); //If user is moderator, show links
|
||||
if ($logged_in_user && $logged_in_user->isSpecialUser(S_MODERATOR)) echo post_moderation_links($post,$logged_in_user->isSpecialUser(S_ADMIN)); //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,14 +3,16 @@
|
|||
/**
|
||||
* Show the links for possible moderation actions related to a single post
|
||||
**/
|
||||
function post_moderation_links($post){
|
||||
function post_moderation_links($post,$admin=0){
|
||||
if ($post->isHidden()){
|
||||
$x = " - <a href=\"forum_moderate_post_action.php?action=unhide&id=".$post->getID()."\">[undelete post]</a> - ";
|
||||
} else {
|
||||
$x = " - <a href=\"forum_moderate_post.php?action=hide&id=".$post->getID()."\">[delete post]</a> ";
|
||||
}
|
||||
$x.= " - <a href=\"forum_moderate_post.php?action=move&id=".$post->getID()."\">[move post]</a>";
|
||||
$x .= " - <a href=forum_moderate_post.php?action=banish_user&id=".$post->getID()."&userid=".$post->getOwnerID().">[banish author]</a>";
|
||||
if ($admin == 1) {
|
||||
$x .= " - <a href=forum_moderate_post.php?action=banish_user&id=".$post->getID()."&userid=".$post->getOwnerID().">[banish author]</a>";
|
||||
}
|
||||
return $x;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,10 @@ if ($action=="hide"){
|
|||
$destination_thread = new Thread(post_int('threadid'));
|
||||
$result = $post->move($destination_thread);
|
||||
} elseif ($action=="banish_user"){
|
||||
if (!$user->isSpecialUser(S_ADMIN)) {
|
||||
// Can't banish without being administrator
|
||||
error_page("You are not authorized to banish this user.");
|
||||
}
|
||||
$userid = get_int('userid');
|
||||
$user = newUser($userid);
|
||||
if (!$user) {
|
||||
|
|
Loading…
Reference in New Issue