fds
This commit is contained in:
parent
61625b0478
commit
172863656d
4 changed files with 19 additions and 25 deletions
|
@ -906,16 +906,19 @@ def ban_user(user_id, v):
|
|||
|
||||
if 'reason' in request.values:
|
||||
if reason.startswith("/post/"):
|
||||
post = reason.split("/post/")[1]
|
||||
post = get_post(post)
|
||||
post.bannedfor = True
|
||||
g.db.add(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/"):
|
||||
comment = reason.split("/comment/")[1]
|
||||
comment = get_comment(comment)
|
||||
comment.bannedfor = True
|
||||
g.db.add(comment)
|
||||
|
||||
try:
|
||||
comment = int(reason.split("/comment/")[1])
|
||||
comment = get_comment(comment)
|
||||
comment.bannedfor = True
|
||||
g.db.add(comment)
|
||||
except: pass
|
||||
g.db.commit()
|
||||
|
||||
if 'redir' in request.values: return (redirect(user.url), user)
|
||||
|
|
|
@ -549,6 +549,9 @@
|
|||
{% include "emoji_modal.html" %}
|
||||
{% include "award_modal.html" %}
|
||||
{% include "delete_comment_modal.html" %}
|
||||
{% if v.admin_level == 6 %}
|
||||
{% include "ban_modal.html" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% include "expanded_image_modal.html" %}
|
||||
{% include "flag_comment_modal.html" %}
|
||||
|
|
|
@ -1353,21 +1353,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{% if v %}
|
||||
{% include "award_modal.html" %}
|
||||
{% include "flag_post_modal.html" %}
|
||||
{% include "flag_comment_modal.html" %}
|
||||
{% include "gif_modal.html" %}
|
||||
{% include "delete_comment_modal.html" %}
|
||||
{% include "delete_post_modal.html" %}
|
||||
|
||||
{% if v.admin_level > 1 %}
|
||||
{% include "ban_modal.html" %}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% include "expanded_image_modal.html" %}
|
||||
|
||||
<script src="/assets/js/general39.js"></script>
|
||||
|
||||
|
|
|
@ -520,6 +520,9 @@
|
|||
{% if v %}
|
||||
{% include "award_modal.html" %}
|
||||
{% include "delete_post_modal.html" %}
|
||||
{% if v.admin_level == 6 %}
|
||||
{% include "ban_modal.html" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% include "expanded_image_modal.html" %}
|
||||
{% include "flag_post_modal.html" %}
|
||||
{% include "flag_post_modal.html" %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue