forked from MarseyWorld/MarseyWorld
same as 36b2db7b2b
parent
d62b72ff31
commit
46d24cddfc
|
@ -98,8 +98,7 @@ def post_id(pid, v, anything=None, sub=None):
|
||||||
p = get_post(pid, v=v)
|
p = get_post(pid, v=v)
|
||||||
if not User.can_see(v, p): abort(403)
|
if not User.can_see(v, p): abort(403)
|
||||||
|
|
||||||
if p.over_18 and not (v and v.over_18) and session.get('over_18_cookies', 0) < int(time.time()):
|
if not g.is_api_or_xhr and p.over_18 and not (v and v.over_18) and session.get('over_18_cookies', 0) < int(time.time()):
|
||||||
if g.is_api_or_xhr: abort(451, "Must be 18+ to view")
|
|
||||||
return render_template("errors/nsfw.html", v=v)
|
return render_template("errors/nsfw.html", v=v)
|
||||||
|
|
||||||
gevent.spawn(_add_post_view, pid)
|
gevent.spawn(_add_post_view, pid)
|
||||||
|
|
Loading…
Reference in New Issue