diff --git a/files/assets/js/submit_emojis.js b/files/assets/js/submit_emojis.js index d90217b3b..f02adbf8d 100644 --- a/files/assets/js/submit_emojis.js +++ b/files/assets/js/submit_emojis.js @@ -5,7 +5,7 @@ function approve_emoji(t, name) { "tags": document.getElementById(`${name}-tags`).value, "name": document.getElementById(`${name}-name`).value, "kind": document.getElementById(`${name}-kind`).value, - "over_18": document.getElementById(`${name}-over-18`).checked, + "over_18": document.getElementById(`${name}-nsfw`).checked, }, () => { document.getElementById(`${name}-emoji`).remove() diff --git a/files/routes/search.py b/files/routes/search.py index 23e6b31ef..e80f80ca4 100644 --- a/files/routes/search.py +++ b/files/routes/search.py @@ -15,7 +15,7 @@ search_operator_hole = HOLE_NAME valid_params = [ 'author', 'domain', - 'over18', + 'nsfw', 'post', 'before', 'after', @@ -112,7 +112,7 @@ def searchposts(v): ) for x in criteria['q']] posts = posts.filter(*words) - if 'over18' in criteria: posts = posts.filter(Post.over_18==True) + if 'nsfw' in criteria: posts = posts.filter(Post.over_18==True) if 'domain' in criteria: domain = criteria['domain'] @@ -236,7 +236,7 @@ def searchcomments(v): ' & '.join(tokens), postgresql_regconfig='english')) - if 'over18' in criteria: comments = comments.filter(Comment.over_18 == True) + if 'nsfw' in criteria: comments = comments.filter(Comment.over_18 == True) if search_operator_hole in criteria: comments = comments.filter(Post.sub == criteria[search_operator_hole]) diff --git a/files/templates/search.html b/files/templates/search.html index 67d68e302..0a1822ed7 100644 --- a/files/templates/search.html +++ b/files/templates/search.html @@ -85,7 +85,7 @@ {% if FEATURES['NSFW_MARKING'] %}
NSFW Only:
- +
{% endif %} {% endif %} diff --git a/files/templates/submit_emojis.html b/files/templates/submit_emojis.html index 10e66b87e..07d3cf12c 100644 --- a/files/templates/submit_emojis.html +++ b/files/templates/submit_emojis.html @@ -45,8 +45,8 @@ {% if FEATURES['NSFW_MARKING'] %}
- - + +
{% endif %} @@ -101,8 +101,8 @@ {% if FEATURES['NSFW_MARKING'] %}
- - + +
{% endif %}