diff --git a/checkin_notes b/checkin_notes index 94cf2f2701..20592c5374 100755 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/html/inc/email.inc b/html/inc/email.inc index b68e7a8d58..2134956f25 100644 --- a/html/inc/email.inc +++ b/html/inc/email.inc @@ -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); } diff --git a/html/user/forum_moderate_post_action.php b/html/user/forum_moderate_post_action.php index cfad69ea70..c7b22fceaa 100644 --- a/html/user/forum_moderate_post_action.php +++ b/html/user/forum_moderate_post_action.php @@ -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 { diff --git a/html/user/forum_moderate_thread_action.php b/html/user/forum_moderate_thread_action.php index 1dab51e5db..1b7dfdc44f 100644 --- a/html/user/forum_moderate_thread_action.php +++ b/html/user/forum_moderate_thread_action.php @@ -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 { diff --git a/html/user/forum_report_post.php b/html/user/forum_report_post.php index c585299136..8d11264968 100644 --- a/html/user/forum_report_post.php +++ b/html/user/forum_report_post.php @@ -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 "thread, "#", $post->id, "\">Return to thread"; } elseif($success_page==0){ page_head('Report a forum post'); - echo "
Before reporting this post please consider using the +/- rating system instead. If enough users agree on rating a post negatively it will + echo "
Before reporting this post please consider using the +/- rating system instead. If enough users agree on rating a post negatively it will eventually be hidden.
"; - start_table(); + start_table(); show_post($post,$thread, $user,0); echo ""; - end_table(); + end_table(); } elseif ($success_page==-1) { page_head('Report NOT registered'); echo "Your report could not be recorded. Please wait a short while and try again.