mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 08:48:18 -05:00
Add link note for banned domains.
This commit is contained in:
committed by
Neil Williams
parent
47afb5178d
commit
e7d91bda36
@@ -45,7 +45,7 @@ from r2.models.wiki import WIKI_RECENT_DAYS
|
||||
|
||||
from collections import defaultdict
|
||||
import time
|
||||
from admintools import compute_votes, admintools, ip_span
|
||||
from admintools import compute_votes, admintools, ip_span, is_banned_domain
|
||||
|
||||
EXTRA_FACTOR = 1.5
|
||||
MAX_RECURSION = 10
|
||||
@@ -212,6 +212,8 @@ class Builder(object):
|
||||
if getattr(item, "verdict", None):
|
||||
if not item.verdict.endswith("-approved"):
|
||||
w.link_notes.append(w.verdict)
|
||||
if hasattr(item, 'url') and is_banned_domain(item.url):
|
||||
w.link_notes.append("banned domain")
|
||||
|
||||
if c.user_is_admin and getattr(item, 'ip', None):
|
||||
w.ip_span = ip_span(item.ip)
|
||||
|
||||
Reference in New Issue
Block a user