forked from rDrama/rDrama
fdsfsd
parent
efff0400ef
commit
79fc26b937
|
@ -33,6 +33,9 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
|
||||||
|
|
||||||
if v and request.path.startswith('/logged_out'): v = None
|
if v and request.path.startswith('/logged_out'): v = None
|
||||||
|
|
||||||
|
if not v or v.oldsite: template2 = ''
|
||||||
|
else: template2 = 'CHRISTMAS/'
|
||||||
|
|
||||||
try: cid = int(cid)
|
try: cid = int(cid)
|
||||||
except:
|
except:
|
||||||
try: cid = int(cid, 36)
|
try: cid = int(cid, 36)
|
||||||
|
@ -64,7 +67,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
|
||||||
|
|
||||||
if post.over_18 and not (v and v.over_18) and not session.get('over_18', 0) >= int(time.time()):
|
if post.over_18 and not (v and v.over_18) and not session.get('over_18', 0) >= int(time.time()):
|
||||||
if request.headers.get("Authorization"): return {'error': f'This content is not suitable for some users and situations.'}
|
if request.headers.get("Authorization"): return {'error': f'This content is not suitable for some users and situations.'}
|
||||||
else: render_template("errors/nsfw.html", v=v)
|
else: render_template(f"{template2}errors/nsfw.html", v=v)
|
||||||
|
|
||||||
try: context = int(request.values.get("context", 0))
|
try: context = int(request.values.get("context", 0))
|
||||||
except: context = 0
|
except: context = 0
|
||||||
|
@ -127,7 +130,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
|
||||||
else:
|
else:
|
||||||
if post.is_banned and not (v and (v.admin_level > 1 or post.author_id == v.id)): template = "submission_banned.html"
|
if post.is_banned and not (v and (v.admin_level > 1 or post.author_id == v.id)): template = "submission_banned.html"
|
||||||
else: template = "submission.html"
|
else: template = "submission.html"
|
||||||
return render_template(template, v=v, p=post, sort=sort, linked_comment=comment, comment_info=comment_info, render_replies=True)
|
return render_template(f"{template2}{template}", v=v, p=post, sort=sort, linked_comment=comment, comment_info=comment_info, render_replies=True)
|
||||||
|
|
||||||
|
|
||||||
@app.post("/comment")
|
@app.post("/comment")
|
||||||
|
|
Loading…
Reference in New Issue