From 7bbc27708a38cdb56b842bea897c5654054d9e72 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 26 Nov 2014 11:36:06 +0100 Subject: [PATCH] Move NaturalSort_DefaultCollator to its own file --- lib/private/naturalsort.php | 11 ----------- lib/private/naturalsort_defaultcollator.php | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 lib/private/naturalsort_defaultcollator.php diff --git a/lib/private/naturalsort.php b/lib/private/naturalsort.php index eb00f99a672..6e259630f79 100644 --- a/lib/private/naturalsort.php +++ b/lib/private/naturalsort.php @@ -9,16 +9,6 @@ namespace OC; -class NaturalSort_DefaultCollator { - - public function compare($a, $b) { - if ($a === $b) { - return 0; - } - return ($a < $b) ? -1 : 1; - } -} - class NaturalSort { private static $instance; private $collator; @@ -114,4 +104,3 @@ class NaturalSort { return self::$instance; } } - 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 @@ + + * 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; + } +}