def send404(self): c.response.status_code = 404 if 'usable_error_content' in request.environ: return request.environ['usable_error_content'] if c.site._spam and not c.user_is_admin: subject = ("the subreddit /r/%s has been incorrectly banned" % c.site.name) message = ( strings.banned_subreddit % dict(link='/message/compose?to=%s&subject=%s' % (url_escape(g.admin_message_acct), url_escape(subject)))) res = pages.RedditError(_('this reddit has been banned'), unsafe(safemarkdown(message))) return res.render() else: return pages.Reddit404().render()
def send404(self): c.response.status_code = 404 if 'usable_error_content' in request.environ: return request.environ['usable_error_content'] if c.site.spammy() and not c.user_is_admin: subject = ("the subreddit /r/%s has been incorrectly banned" % c.site.name) lnk = ("/r/redditrequest/submit?url=%s&title=%s" % (url_escape("http://%s/r/%s" % (g.domain, c.site.name)), ("the subreddit /r/%s has been incorrectly banned" % c.site.name))) message = strings.banned_subreddit % dict(link=lnk) res = pages.RedditError(_('this reddit has been banned'), unsafe(safemarkdown(message))) return res.render() else: return pages.Reddit404().render()