]> source.dussan.org Git - nextcloud-server.git/commitdiff
Move NaturalSort_DefaultCollator to its own file
authorJoas Schilling <nickvergessen@gmx.de>
Wed, 26 Nov 2014 10:36:06 +0000 (11:36 +0100)
committerJoas Schilling <nickvergessen@gmx.de>
Thu, 27 Nov 2014 16:47:21 +0000 (17:47 +0100)
lib/private/naturalsort.php
lib/private/naturalsort_defaultcollator.php [new file with mode: 0644]

index eb00f99a672295fc95b808adc1473b55ee98d824..6e259630f79db6a25e92e634ca580853ca5db929 100644 (file)
@@ -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 (file)
index 0000000..e1007f8
--- /dev/null
@@ -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;
+       }
+}