Commit Graph

9 Commits

Author SHA1 Message Date
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Vincent Petry fb87b746f0 Merge pull request #14213 from AW-UC/naturalsort_defaultcollator-patch-file-sorting
Update naturalsort_defaultcollator.php. Fixes #13982
2015-02-25 10:30:14 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
AW-UC bc668600cd Add constructor to inject collator
Adding the possibility for instantiating \OC\NaturalSort with an
injected collator. This makes the use of a specific collator enforcable.
2015-02-20 14:03:34 +01:00
Robin McCorkell 44c330aa5d Performance improvements for NaturalSort
A combination of using isset() instead of count() or strlen(), caching the
chunkify function, and replacing is_numeric() with some comparisons
2015-02-09 16:32:43 +00:00
Joas Schilling 7bbc27708a Move NaturalSort_DefaultCollator to its own file 2014-11-27 17:47:21 +01:00
Lukas Reschke b4944ffcc5 Fix PHPDoc 2014-09-30 13:34:50 +02:00
Vincent Petry f2001a48a4 Fixed sort algo for additional cases 2014-08-11 13:28:53 +02:00
Vincent Petry 173059f6d0 Fixed file list sorting
Now using a natural sort algorithm that is more consistent between JS
and PHP (although not perfect in some corner cases)

- added OC.Util.naturalSortComparator that uses the same algo that was
  used for the user list
- changed user list and files list to use OC.Util.naturalSortComparator
- removed toLowerCase() and changed the comparator to use
  String.localeCompare()
- added unit tests
- added OC_NaturalSort that is used by OCP\Util::naturalSortCompare()
2014-08-11 13:28:53 +02:00