summaryrefslogtreecommitdiffstats
path: root/lib/redmine
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-09-20 02:08:15 +0000
committerGo MAEDA <maeda@farend.jp>2018-09-20 02:08:15 +0000
commit1d596677f2053e9c5c157b2796ceb2a273c45687 (patch)
tree5d40a838551ed7e287c93147e0767505b1523fcd /lib/redmine
parent4a5a68f19cda7de53ddd256fef71bf76a4512cd5 (diff)
downloadredmine-1d596677f2053e9c5c157b2796ceb2a273c45687.tar.gz
redmine-1d596677f2053e9c5c157b2796ceb2a273c45687.zip
Redmine::SortCriteria#normalize! does not limit properly the maximum number of elements (#29632).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@17494 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine')
-rw-r--r--lib/redmine/sort_criteria.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/redmine/sort_criteria.rb b/lib/redmine/sort_criteria.rb
index 8193b9b91..2a6969486 100644
--- a/lib/redmine/sort_criteria.rb
+++ b/lib/redmine/sort_criteria.rb
@@ -88,8 +88,7 @@ module Redmine
def normalize!
self.collect! {|s| s = Array(s); [s.first, (s.last == false || s.last.to_s == 'desc') ? 'desc' : 'asc']}
- self.slice!(3)
- self
+ self.replace self.first(3)
end
# Appends ASC/DESC to the sort criterion unless it has a fixed order