forked from rDrama/rDrama
fds
parent
8e9ca8ef86
commit
b9e9e6cf12
|
@ -906,16 +906,19 @@ def ban_user(user_id, v):
|
||||||
|
|
||||||
if 'reason' in request.values:
|
if 'reason' in request.values:
|
||||||
if reason.startswith("/post/"):
|
if reason.startswith("/post/"):
|
||||||
post = reason.split("/post/")[1]
|
try:
|
||||||
post = get_post(post)
|
post = int(reason.split("/post/")[1])
|
||||||
post.bannedfor = True
|
post = get_post(post)
|
||||||
g.db.add(post)
|
post.bannedfor = True
|
||||||
|
g.db.add(post)
|
||||||
|
except: pass
|
||||||
elif reason.startswith("/comment/"):
|
elif reason.startswith("/comment/"):
|
||||||
comment = reason.split("/comment/")[1]
|
try:
|
||||||
comment = get_comment(comment)
|
comment = int(reason.split("/comment/")[1])
|
||||||
comment.bannedfor = True
|
comment = get_comment(comment)
|
||||||
g.db.add(comment)
|
comment.bannedfor = True
|
||||||
|
g.db.add(comment)
|
||||||
|
except: pass
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
if 'redir' in request.values: return (redirect(user.url), user)
|
if 'redir' in request.values: return (redirect(user.url), user)
|
||||||
|
|
|
@ -549,6 +549,9 @@
|
||||||
{% include "emoji_modal.html" %}
|
{% include "emoji_modal.html" %}
|
||||||
{% include "award_modal.html" %}
|
{% include "award_modal.html" %}
|
||||||
{% include "delete_comment_modal.html" %}
|
{% include "delete_comment_modal.html" %}
|
||||||
|
{% if v.admin_level == 6 %}
|
||||||
|
{% include "ban_modal.html" %}
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% include "expanded_image_modal.html" %}
|
{% include "expanded_image_modal.html" %}
|
||||||
{% include "flag_comment_modal.html" %}
|
{% include "flag_comment_modal.html" %}
|
||||||
|
|
|
@ -1353,21 +1353,6 @@
|
||||||
</div>
|
</div>
|
||||||
</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>
|
<script src="/assets/js/general39.js"></script>
|
||||||
|
|
||||||
|
|
|
@ -520,6 +520,9 @@
|
||||||
{% if v %}
|
{% if v %}
|
||||||
{% include "award_modal.html" %}
|
{% include "award_modal.html" %}
|
||||||
{% include "delete_post_modal.html" %}
|
{% include "delete_post_modal.html" %}
|
||||||
|
{% if v.admin_level == 6 %}
|
||||||
|
{% include "ban_modal.html" %}
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% include "expanded_image_modal.html" %}
|
{% include "expanded_image_modal.html" %}
|
||||||
{% include "flag_post_modal.html" %}
|
{% include "flag_post_modal.html" %}
|
||||||
|
|
Loading…
Reference in New Issue