From e5f3613a62d786821ca6baa3d49fa135d5d128ce Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 16 Sep 2021 13:42:38 +0200 Subject: [PATCH] fd' --- files/routes/admin.py | 2 +- files/templates/comments.html | 4 ++-- files/templates/submission.html | 4 ++-- files/templates/submission_listing.html | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 3b2f9e964d..71512ecbe0 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -833,7 +833,7 @@ def ban_user(user_id, v): if user.admin_level >= v.admin_level: abort(403) # check for number of days for suspension - days = int(request.form.get("days")) if request.form.get('days') else 0 + days = int(request.values.get("days")) if request.values.get('days') else 0 reason = sanitize(request.values.get("reason", "")) message = request.values.get("reason", "") diff --git a/files/templates/comments.html b/files/templates/comments.html index 10a1602079..6a04f25f59 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -335,7 +335,7 @@ {% if v and v.admin_level==6 and v.id != c.author_id %}
  • Unban user
  • -
  • Ban user
  • +
  • Ban user
  • {% endif %} {% if v and v.admin_level >=4 and c.oauth_app %} @@ -494,7 +494,7 @@ {% if v and (c.post and v.admin_level == 6) %} {% if c.author_id != v.id %} -
  • Ban user
  • +
  • Ban user
  • Unban user
  • {% endif %} {% endif %} diff --git a/files/templates/submission.html b/files/templates/submission.html index 038f6ed5ae..4b6ef7b459 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -179,7 +179,7 @@ {% endif %} {% if v and v.admin_level == 6 and v.id!=p.author_id %} - + {% endif %} @@ -489,7 +489,7 @@ {% endif %} {% if v.admin_level >=3 and v.id!=p.author_id %} -
  • Ban user
  • +
  • Ban user
  • Unban user
  • {% endif %} {% endif %} diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index 897f8cb610..0652025caa 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -208,7 +208,7 @@ {% endif %} {% if v.admin_level >=3 and v.id!=p.author_id %} -
  • Ban user
  • +
  • Ban user
  • Unban user
  • {% endif %} {% endif %} @@ -371,7 +371,7 @@ {% endif %} {% if v and v.admin_level == 6 and v.id!=p.author_id %} - + {% endif %}