alf (red_alf) wrote in changelog,
alf
red_alf
changelog

[livejournal] r22712: int LJSV-2180: If entry rejected as spam...

Committer: afedorov
int LJSV-2180: If entry rejected as spam then it's author should be marked as spammer
U   trunk/htdocs/community/moderate.bml
Modified: trunk/htdocs/community/moderate.bml
===================================================================
--- trunk/htdocs/community/moderate.bml	2012-08-21 12:19:55 UTC (rev 22711)
+++ trunk/htdocs/community/moderate.bml	2012-08-21 14:45:08 UTC (rev 22712)
@@ -10,6 +10,7 @@
     return LJ::server_down_html() if ($LJ::SERVER_DOWN);
     use Class::Autouse qw (LJ::Poll);
     use LJ::Setting::Music;
+    use LJ::User::UserlogRecord;
 
     LJ::need_res(qw(
                     stc/widgets/selecttags.css
@@ -132,8 +133,15 @@
 
             LJ::run_hooks('rejected_entry', $c, $modid, $poster);
 
-            if ($POST{'mark_as_spam'} && !LJ::reject_entry_as_spam($c->{'userid'}, $modid)) {
+            if ($POST{'mark_as_spam'}) {
+                if  (LJ::reject_entry_as_spam($c->{'userid'}, $modid)) {
+                    $c->ban_user($poster);
+                    LJ::set_rel($c->{'userid'}, $poster->{'userid'}, 'D');
+                    LJ::User::UserlogRecord::SpamSet->create( $c, 'spammerid' => $poster->{'userid'}, 'remote' => $remote );
+                    LJ::run_hook('auto_suspender_for_spam', $poster->{'userid'});
+                } else {
                     $success = 0;
+                }
             }
         }
 

Tags: afedorov, bml, livejournal, red_alf
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments