Using existing method for comparison
authorAlexander Ebert <ebert@woltlab.com>
Tue, 27 May 2014 18:09:20 +0000 (20:09 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 27 May 2014 18:09:20 +0000 (20:09 +0200)
wcfsetup/install/files/lib/system/label/LabelHandler.class.php

index f382e0d0a58d0ea35abf280798d52d853eeea5d9..ac0e75cdc581d3cd3ccddcf7638a1a56928c0d9a 100644 (file)
@@ -314,13 +314,7 @@ class LabelHandler extends SingletonFactory {
                        $data[$groupID] = $this->labelGroups['groups'][$groupID];
                }
                
-               uasort($data, function($a, $b) {
-                       if ($a->showOrder == $b->showOrder) {
-                               return ($a->groupID > $b->groupID) ? 1 : -1;
-                       }
-                       
-                       return ($a->showOrder > $b->showOrder) ? 1 : -1;
-               });
+               uasort($data, array('\wcf\data\label\group\LabelGroup', 'sortLabelGroups'));
                
                return $data;
        }