*** empty log message ***

svn path=/trunk/boinc/; revision=10354
This commit is contained in:
Rom Walton 2006-06-15 06:51:21 +00:00
parent 85c2cfc698
commit a8078f11b8
5 changed files with 46 additions and 16 deletions

View File

@ -6022,3 +6022,17 @@ David 14 June 2006
client/
app.C,h
Rom 15 June 2006
- Remove the code block that mixes the forum rating restrictions with
reporting abuse.
- Add the moderators name to all outgoing moderation email
- Add the email address that should be used for disputes with
moderation.
html/inc/
email.inc
html/user/
forum_moderate_post_action.php
forum_moderate_thread_action.php
forum_report_post.php

View File

@ -128,7 +128,7 @@ function is_valid_email_addr($addr) {
//////////////////////////////////////////////
function send_moderation_email($user, $thread, $post, $message) {
function send_moderation_email($moderator, $user, $thread, $post, $message) {
global $master_url;
$body = "";
@ -136,6 +136,7 @@ function send_moderation_email($user, $thread, $post, $message) {
$body = PROJECT." notification:
This email is sent to inform you that one of your posts in the forum has been affected by moderation in ".PROJECT.":
Moderator: ".$moderator->name."
Thread: ".$thread->title."
Link: $master_url/forum_thread.php?id=".$thread->id."
@ -146,12 +147,18 @@ $body .= "
This was the contents of your post:
".$post->content."
For further information and assistance with ".PROJECT." go to $master_url";
For further information and assistance with ".PROJECT." go to $master_url
If you wish to dispute the reason for this moderation forward this email to:
".$forum_post_reporting_admin->email_addr."
Please state why you think it was improperly moderated.
";
return send_email($user, $subject, $body);
}
function send_thread_moderation_email($user, $thread, $message) {
function send_thread_moderation_email($moderator, $user, $thread, $message) {
global $master_url;
$body = "";
@ -159,6 +166,7 @@ function send_thread_moderation_email($user, $thread, $message) {
$body = PROJECT." notification:
This email is sent to inform you that one of your threads in the forum has been affected by moderation in ".PROJECT.":
Moderator: ".$moderator->name."
Thread: ".$thread->title."
Link: $master_url/forum_thread.php?id=".$thread->id."
@ -166,7 +174,13 @@ The moderator gave this explanation to why your thread was moderated:
".$message;
$body .= "
For further information and assistance with ".PROJECT." go to $master_url";
For further information and assistance with ".PROJECT." go to $master_url
If you wish to dispute the reason for this moderation forward this email to:
".$forum_post_reporting_admin->email_addr."
Please state why you think it was improperly moderated.
";
return send_email($user, $subject, $body);
}

View File

@ -62,7 +62,7 @@ if ($action=="hide"){
if ($result) {
echo mysql_error();
if (post_str('reason', true)){
send_moderation_email(lookup_user_id($post->user),$thread, $post, post_str("reason"));
send_moderation_email($user, lookup_user_id($post->user),$thread, $post, post_str("reason"));
}
header('Location: forum_thread.php?id='.$thread->id);
} else {

View File

@ -67,7 +67,7 @@ if ($action=="hide"){
if ($result) {
echo mysql_error();
if (post_str('reason', true)){
send_thread_moderation_email(lookup_user_id($post->user),$thread, post_str("reason"));
send_thread_moderation_email($user, lookup_user_id($post->user),$thread, post_str("reason"));
}
header('Location: forum_thread.php?id='.$thread->id);
} else {

View File

@ -10,7 +10,7 @@ function getHasReported($user,$postId){
return false;
}
db_init();
db_init();
$postId = get_int('post');
@ -26,9 +26,11 @@ db_init();
/* Make sure the user has the forum's minimum amount of RAC and total credit
* before allowing them to report a post. Using the same rules as for rating (at least for now)
*/
/*
if ($user->total_credit<$forum->rate_min_total_credit || $user->expavg_credit<$forum->rate_min_expavg_credit) {
error_page("You need more average or total credit to report a post.");
}
*/
if (getHasReported($user,$postId)) {
error_page("You have already reported this post once.");
@ -37,12 +39,12 @@ db_init();
//__-------------- Action part
$success_page=0;
if (get_str("submit",true)){
$reason = get_str("reason");
if (send_report_post_email($user, $thread,$post,$reason)){
$success_page=1;
} else {
$success_page=-1;
}
$reason = get_str("reason");
if (send_report_post_email($user, $thread,$post,$reason)){
$success_page=1;
} else {
$success_page=-1;
}
}
@ -55,9 +57,9 @@ db_init();
echo "<a href=\"forum_thread.php?id=", $post->thread, "#", $post->id, "\">Return to thread</a>";
} elseif($success_page==0){
page_head('Report a forum post');
echo "<p>Before reporting this post <em>please</em> consider using the +/- rating system instead. If enough users agree on rating a post negatively it will
echo "<p>Before reporting this post <em>please</em> consider using the +/- rating system instead. If enough users agree on rating a post negatively it will
eventually be hidden.</p>";
start_table();
start_table();
show_post($post,$thread, $user,0);
echo "<form action=\"forum_report_post.php\" method=\"get\">\n";
row1("Report post");
@ -68,7 +70,7 @@ db_init();
"<input type=\"submit\" name=\"submit\" value=\"OK\">");
echo "<input type=\"hidden\" name=\"post\" value=\"".$post->id."\">";
echo "</form>";
end_table();
end_table();
} elseif ($success_page==-1) {
page_head('Report NOT registered');
echo "<p>Your report could not be recorded. Please wait a short while and try again.</p>