mirror of
https://github.com/redmine/redmine.git
synced 2025-12-16 05:20:28 +01:00
Remove duplicate keys from sort criteria (#32737).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@19636 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -90,6 +90,7 @@ module Redmine
|
||||
|
||||
def normalize!
|
||||
self.reject! {|s| s.first.blank? }
|
||||
self.uniq! {|s| s.first }
|
||||
self.collect! {|s| s = Array(s); [s.first, (s.last == false || s.last.to_s == 'desc') ? 'desc' : 'asc']}
|
||||
self.replace self.first(3)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user