Add sysban notes for banning IP addresses.

        Patch by exor674. 

diffs (17 lines):

diff -r c6ff7859a2b7 -r c53761b35d31 htdocs/admin/spamreports.bml
--- a/htdocs/admin/spamreports.bml      Fri Mar 11 11:42:18 2011 +0800
+++ b/htdocs/admin/spamreports.bml      Fri Mar 11 13:55:58 2011 +0800
@@ -227,8 +227,12 @@ _c?>
         # add quick sysban links for ease
         my $extra = "";
         if ($by eq "ip") {
-            if (LJ::sysban_check("talk_ip_test", $what)) {
+            my $reason = LJ::sysban_populate_full_by_value( $what, 
'talk_ip_test' );
+            if ( $reason && $reason->{talk_ip_test} ) {
                 $extra = "<strong>Already talk_ip_test banned</strong>";
+                if ( $remote->has_priv( 'sysban' ) ) {
+                    $extra .= "<br/><textarea name='sysban_note' rows='3' 
cols='60' readonly='1'>" . ( $reason->{talk_ip_test}->{note} || "(no note)" ) . 
"</textarea>";
+                }
             } else {
                 $extra = LJ::html_check({name => "sysban_ip", value => $what, 
label => "Also Sysban IP?"});
                 $extra .= "<br/><textarea name='sysban_note' rows='3' 
cols='60'> ~" . $remote->username . " @ " . LJ::mysql_time() . "</textarea>";
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to