diff --git a/files/routes/admin.py b/files/routes/admin.py index 00c6475481..700ada0c65 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -967,15 +967,15 @@ def api_distinguish_post(post_id, v): @validate_formkey def api_sticky_post(post_id, v): - pins = g.db.query(Submission.id).filter(Submission.stickied != None, Submission.is_banned == False).count() - if pins > 2: return {"error": "Can't exceed 3 pinned posts limit!"}, 403 - post = g.db.query(Submission).filter_by(id=post_id).first() if post: if post.stickied: if post.stickied.startswith("t:"): abort(403) else: post.stickied = None - else: post.stickied = v.username + else: + pins = g.db.query(Submission.id).filter(Submission.stickied != None, Submission.is_banned == False).count() + if pins > 2: return {"error": "Can't exceed 3 pinned posts limit!"}, 403 + post.stickied = v.username g.db.add(post) ma=ModAction( diff --git a/files/templates/CHRISTMAS/changelog.html b/files/templates/CHRISTMAS/changelog.html index 50541444df..afb8591c9c 100644 --- a/files/templates/CHRISTMAS/changelog.html +++ b/files/templates/CHRISTMAS/changelog.html @@ -104,6 +104,6 @@ {% endif %} - + {% endblock %} \ No newline at end of file diff --git a/files/templates/CHRISTMAS/default.html b/files/templates/CHRISTMAS/default.html index e23662a86c..d4fe66a4e6 100644 --- a/files/templates/CHRISTMAS/default.html +++ b/files/templates/CHRISTMAS/default.html @@ -346,7 +346,7 @@ {% if v %} - + {% endif %} diff --git a/files/templates/CHRISTMAS/settings.html b/files/templates/CHRISTMAS/settings.html index 09aff7c82b..8d61df2a3f 100644 --- a/files/templates/CHRISTMAS/settings.html +++ b/files/templates/CHRISTMAS/settings.html @@ -215,7 +215,7 @@ {% if v %} - + {% endif %} \ No newline at end of file diff --git a/files/templates/admin/image_posts.html b/files/templates/admin/image_posts.html index ec6ec1d803..0ec4c92dc7 100644 --- a/files/templates/admin/image_posts.html +++ b/files/templates/admin/image_posts.html @@ -53,7 +53,4 @@ {% endif %} -{% endblock %} - -{% block SongsTax %} {% endblock %} \ No newline at end of file diff --git a/files/templates/admin/reported_posts.html b/files/templates/admin/reported_posts.html index 7f5796b317..6305463c48 100644 --- a/files/templates/admin/reported_posts.html +++ b/files/templates/admin/reported_posts.html @@ -80,7 +80,4 @@ {% endif %} -{% endblock %} - -{% block SongsTax %} {% endblock %} \ No newline at end of file diff --git a/files/templates/userpage.html b/files/templates/userpage.html index eb9a735ea4..b816afb53c 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -683,6 +683,18 @@ +{% if u.song %} +
{{u.id}}
+{% endif %} + +{% if v %} +
{% if v.patron or u.patron %}0{% else %}0.03{% endif %}
+ +
{{u.username}}
+{% endif %} + + + {% endblock %} {% block pagenav %} @@ -720,16 +732,5 @@ {% endblock %} -{% block SongsTax %} - {% if u.song %} -
{{u.id}}
- {% endif %} - - {% if v %} -
{% if v.patron or u.patron %}0{% else %}0.03{% endif %}
- -
{{u.username}}
- {% endif %} - - +{% block GIFpicker %} {% endblock %} \ No newline at end of file diff --git a/files/templates/userpage_comments.html b/files/templates/userpage_comments.html index 2dbd535691..05129dcf73 100644 --- a/files/templates/userpage_comments.html +++ b/files/templates/userpage_comments.html @@ -103,4 +103,16 @@ {% endif %} + +{% if u.song %} +
{{u.id}}
+{% endif %} + +{% if v %} +
{% if v.patron or u.patron %}0{% else %}0.03{% endif %}
+ +
{{u.username}}
+{% endif %} + + {% endblock %} \ No newline at end of file diff --git a/files/templates/userpage_private.html b/files/templates/userpage_private.html index 476d680fac..41a90b3c85 100644 --- a/files/templates/userpage_private.html +++ b/files/templates/userpage_private.html @@ -30,6 +30,18 @@ + +{% if u.song %} +
{{u.id}}
+{% endif %} + +{% if v %} +
{% if v.patron or u.patron %}0{% else %}0.03{% endif %}
+ +
{{u.username}}
+{% endif %} + + {% endblock %} {% block pagenav %}