Browse Source

Move NaturalSort_DefaultCollator to its own file

tags/v8.0.0alpha1
Joas Schilling 9 years ago
parent
commit
7bbc27708a
2 changed files with 19 additions and 11 deletions
  1. 0
    11
      lib/private/naturalsort.php
  2. 19
    0
      lib/private/naturalsort_defaultcollator.php

+ 0
- 11
lib/private/naturalsort.php View 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;
}
}


+ 19
- 0
lib/private/naturalsort_defaultcollator.php View File

@@ -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;
}
}

Loading…
Cancel
Save