From 8d4af4abf6fd0d7f066402c54349d23a55851548 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 4 Feb 2022 17:38:16 +0200 Subject: [PATCH] fds --- files/routes/comments.py | 2 +- files/routes/posts.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 28a227968..0b126e8fc 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -127,7 +127,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None): else: 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" - return render_template(template, v=v, p=post, sort=sort, comment_info=comment_info, render_replies=True) + return render_template(template, v=v, p=post, sort=sort, comment_info=comment_info, render_replies=True, hole=post.hole) @app.post("/comment") @limiter.limit("1/second;20/minute;200/hour;1000/day") diff --git a/files/routes/posts.py b/files/routes/posts.py index 7f9ffcf63..9bb843a7c 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -244,7 +244,7 @@ def post_id(pid, anything=None, v=None): else: 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" - return render_template(template, v=v, p=post, ids=list(ids), sort=sort, render_replies=True, offset=offset) + return render_template(template, v=v, p=post, ids=list(ids), sort=sort, render_replies=True, offset=offset, hole=p.hole) @app.post("/viewmore///") @limiter.limit("1/second;30/minute;200/hour;1000/day") @@ -1239,7 +1239,7 @@ def submit_post(v, hole=None): if 'megathread' in new_post.title.lower(): sort = 'new' else: sort = v.defaultsortingcomments if len(body_html) < 40000: new_post.replies = [c] - return render_template('submission.html', v=v, p=new_post, sort=sort, render_replies=True, offset=0, success=True) + return render_template('submission.html', v=v, p=new_post, sort=sort, render_replies=True, offset=0, success=True, hole=new_post.hole) @app.post("/delete_post/")