From e7d91bda366123e2eeef76214d3c82cc05e9c870 Mon Sep 17 00:00:00 2001 From: bsimpson63 Date: Wed, 12 Jun 2013 16:36:47 -0400 Subject: [PATCH] Add link note for banned domains. --- r2/r2/models/builder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/r2/r2/models/builder.py b/r2/r2/models/builder.py index 215c19998..f293cd836 100755 --- a/r2/r2/models/builder.py +++ b/r2/r2/models/builder.py @@ -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)