Merge branch 'master' of https://github.com/Aevann1/Drama
commit
50c9e4a5e8
|
@ -815,19 +815,15 @@ def ban_user(user_id, v):
|
|||
|
||||
if 'reason' in request.values:
|
||||
if reason.startswith("/post/"):
|
||||
try:
|
||||
post = int(reason.split("/post/")[1])
|
||||
post = get_post(post)
|
||||
post.bannedfor = True
|
||||
g.db.add(post)
|
||||
except: pass
|
||||
elif reason.startswith("/comment/"):
|
||||
try:
|
||||
comment = int(reason.split("/comment/")[1])
|
||||
comment = get_comment(comment)
|
||||
comment.bannedfor = True
|
||||
g.db.add(comment)
|
||||
except: pass
|
||||
post = int(reason.split("/post/")[1].split(None, 1)[0])
|
||||
post = get_post(post)
|
||||
post.bannedfor = True
|
||||
g.db.add(post)
|
||||
elif reason.startswith("/comment/"):
|
||||
comment = int(reason.split("/comment/")[1].split(None, 1)[0])
|
||||
comment = get_comment(comment)
|
||||
comment.bannedfor = True
|
||||
g.db.add(comment)
|
||||
g.db.commit()
|
||||
|
||||
if 'redir' in request.values: return redirect(user.url)
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<img loading="lazy" height="30" src="/assets/images/{{'SITE_NAME' | app_config}}/headericon.webp?v=3">
|
||||
{% if "gigachadlife" in request.host %}
|
||||
<span style="font-weight: bold; font-size: 1.2rem;">GigaChadLife</span>
|
||||
{% else %}
|
||||
{% elif 'pcm' not in request.host %}
|
||||
<img loading="lazy" src="/assets/images/{{'SITE_NAME' | app_config}}/logo.webp?v=1" height="20">
|
||||
{% endif %}
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue