diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-11-26 11:36:06 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-11-27 17:47:21 +0100 |
commit | 7bbc27708a38cdb56b842bea897c5654054d9e72 (patch) | |
tree | 4579bfb540ad758712bee216526077c3a1b59e58 /lib/private/naturalsort_defaultcollator.php | |
parent | 7b8824a4e3b7e0c1484540991ab7b3f5d99afe98 (diff) | |
download | nextcloud-server-7bbc27708a38cdb56b842bea897c5654054d9e72.tar.gz nextcloud-server-7bbc27708a38cdb56b842bea897c5654054d9e72.zip |
Move NaturalSort_DefaultCollator to its own file
Diffstat (limited to 'lib/private/naturalsort_defaultcollator.php')
-rw-r--r-- | lib/private/naturalsort_defaultcollator.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/private/naturalsort_defaultcollator.php b/lib/private/naturalsort_defaultcollator.php new file mode 100644 index 00000000000..e1007f8d7b4 --- /dev/null +++ b/lib/private/naturalsort_defaultcollator.php @@ -0,0 +1,19 @@ +<?php +/** + * Copyright (c) 2014 Vincent Petry <PVince81@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + * + */ + +namespace OC; + +class NaturalSort_DefaultCollator { + public function compare($a, $b) { + if ($a === $b) { + return 0; + } + return ($a < $b) ? -1 : 1; + } +} |