Skip to content

A platform for community discussion. Free, open, simple.

DEV: Remove deprecated ascending param from AdminUserIndexQuery (#22741)

Ted Johansson0db98e9d864a
diff --git a/lib/admin_user_index_query.rb b/lib/admin_user_index_query.rb
index fd9c364b3b3..d8569ed0342 100644
--- a/lib/admin_user_index_query.rb
+++ b/lib/admin_user_index_query.rb
@@ -33,22 +33,11 @@ class AdminUserIndexQuery
find_users_query.count
end
- def custom_direction
- if params[:ascending]
- Discourse.deprecate(
- ":ascending is deprecated please use :asc instead",
- output_in_test: true,
- drop_from: "2.9.0",
- )
- end
- asc = params[:asc] || params[:ascending]
- asc.present? && asc ? "ASC" : "DESC"
- end
-
def initialize_query_with_order(klass)
order = []
custom_order = params[:order]
+ custom_direction = params[:asc].present? ? "ASC" : "DESC"
if custom_order.present? &&
without_dir = SORTABLE_MAPPING[custom_order.downcase.sub(/ (asc|desc)\z/, "")]
order << "#{without_dir} #{custom_direction}"