search: remove legacy 'search[sort]' params.
Remove support for the `search[sort]` param on certain index pages. This hasn't been used for years, and it caused the `search[order]=` param to be added to pagination links even when the order was blank.
This commit is contained in:
@@ -502,7 +502,6 @@ class Artist < ApplicationRecord
|
||||
q = q.includes(:tag).where("tags.name IS NULL OR tags.post_count <= 0").references(:tags)
|
||||
end
|
||||
|
||||
params[:order] ||= params.delete(:sort)
|
||||
case params[:order]
|
||||
when "name"
|
||||
q = q.order("artists.name")
|
||||
|
||||
@@ -11,7 +11,6 @@ class ArtistVersion < ApplicationRecord
|
||||
|
||||
q = q.search_attributes(params, :updater, :is_active, :is_banned, :artist_id, :name, :group_name)
|
||||
|
||||
params[:order] ||= params.delete(:sort)
|
||||
if params[:order] == "name"
|
||||
q = q.order("artist_versions.name").default_order
|
||||
else
|
||||
|
||||
@@ -70,7 +70,6 @@ class Pool < ApplicationRecord
|
||||
q = q.collection
|
||||
end
|
||||
|
||||
params[:order] ||= params.delete(:sort)
|
||||
case params[:order]
|
||||
when "name"
|
||||
q = q.order("pools.name")
|
||||
|
||||
@@ -853,7 +853,6 @@ class Tag < ApplicationRecord
|
||||
q = q.joins("LEFT JOIN artists ON tags.name = artists.name").where("artists.name IS NULL OR artists.is_active = false")
|
||||
end
|
||||
|
||||
params[:order] ||= params.delete(:sort)
|
||||
case params[:order]
|
||||
when "name"
|
||||
q = q.order("name")
|
||||
|
||||
@@ -101,7 +101,6 @@ class WikiPage < ApplicationRecord
|
||||
q = q.where("other_names is null or other_names = '{}'")
|
||||
end
|
||||
|
||||
params[:order] ||= params.delete(:sort)
|
||||
case params[:order]
|
||||
when "title"
|
||||
q = q.order("title")
|
||||
|
||||
Reference in New Issue
Block a user