diff --git a/files/templates/changelog.html b/files/templates/changelog.html
index 59a046d59..0be252871 100644
--- a/files/templates/changelog.html
+++ b/files/templates/changelog.html
@@ -1,5 +1,5 @@
{% extends "settings2.html" %}
-{%- import 'component/sorting_time.html' as sorting_time with context -%}
+{%- import 'component/sorting_time.html' as sorting_time -%}
{% block pagetitle %}Changelog{% endblock %}
@@ -36,7 +36,7 @@
- {{sorting_time.sort_dropdown(false)}}
+ {{sorting_time.sort_dropdown(sort, t, SORTS_POSTS)}}
{% endblock %}
diff --git a/files/templates/component/sorting_time.html b/files/templates/component/sorting_time.html
index 41cfd3d5a..1516e1cf8 100644
--- a/files/templates/component/sorting_time.html
+++ b/files/templates/component/sorting_time.html
@@ -1,4 +1,4 @@
-{%- macro sort_dropdown(is_comment, extra_query) -%}
+{%- macro sort_dropdown(sort, t, all_sorts, extra_query='') -%}
{% set all_sorts = SORTS_COMMENTS if is_comment else SORTS_POSTS %}
{% set ccmode_text = 'ccmode=' . ccmode %}
- {{sorting_time.sort_dropdown(false, ccmode_text)}}
+ {{sorting_time.sort_dropdown(sort, t, SORTS_POSTS, ccmode_text)}}
{% endblock %}
diff --git a/files/templates/home_comments.html b/files/templates/home_comments.html
index bed5b8768..c79f5a487 100644
--- a/files/templates/home_comments.html
+++ b/files/templates/home_comments.html
@@ -1,5 +1,5 @@
{% extends "default.html" %}
-{%- import 'component/sorting_time.html' as sorting_time with context -%}
+{%- import 'component/sorting_time.html' as sorting_time -%}
{% block sortnav %}{% endblock %}
@@ -31,7 +31,7 @@
- {{sorting_time.sort_dropdown(true)}}
+ {{sorting_time.sort_dropdown(sort, t, SORTS_COMMENTS)}}
diff --git a/files/templates/search.html b/files/templates/search.html
index 6b0e30a29..a5b9bc5a0 100644
--- a/files/templates/search.html
+++ b/files/templates/search.html
@@ -1,5 +1,5 @@
{% extends "home.html" %}
-{%- import 'component/sorting_time.html' as sorting_time with context -%}
+{%- import 'component/sorting_time.html' as sorting_time -%}
{% block pagetype %}search{% endblock %}
@@ -32,7 +32,7 @@
{% set query_text = 'q=' ~ query | urlencode %}
- {{sorting_time.sort_dropdown(false, query_text)}}
+ {{sorting_time.sort_dropdown(sort, t, SORTS_POSTS, query_text)}}
{% endif %}
{% endblock %}
diff --git a/files/templates/submission.html b/files/templates/submission.html
index 79b7b3dbb..761f7d98a 100644
--- a/files/templates/submission.html
+++ b/files/templates/submission.html
@@ -1,5 +1,5 @@
{% extends "default.html" %}
-{%- import 'component/sorting_time.html' as sorting_time with context -%}
+{%- import 'component/sorting_time.html' as sorting_time -%}
{% if p.should_hide_score %}
{% set ups="" %}
@@ -447,7 +447,7 @@
{% endif %}
diff --git a/files/templates/userpage_comments.html b/files/templates/userpage_comments.html
index 97429fa49..b8f4890bd 100644
--- a/files/templates/userpage_comments.html
+++ b/files/templates/userpage_comments.html
@@ -1,5 +1,5 @@
{% extends "userpage.html" %}
-{%- import 'component/sorting_time.html' as sorting_time with context -%}
+{%- import 'component/sorting_time.html' as sorting_time -%}
{% block content %}
@@ -53,7 +53,7 @@
- {{sorting_time.sort_dropdown(true)}}
+ {{sorting_time.sort_dropdown(sort, t, SORTS_COMMENTS)}}
{% endif %}