Fixed label sort order
authorMarcel Werk <burntime@woltlab.com>
Mon, 3 Jun 2013 18:37:16 +0000 (20:37 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 3 Jun 2013 18:37:16 +0000 (20:37 +0200)
wcfsetup/install/files/lib/system/cache/builder/LabelCacheBuilder.class.php

index dd758cd85ae0c5af8db6a8e9310d98a28e5a7de0..38e17d5813d59c2f562345e4634d03aece7d18d3 100644 (file)
@@ -27,6 +27,7 @@ class LabelCacheBuilder extends AbstractCacheBuilder {
                
                // get label groups
                $groupList = new LabelGroupList();
+               $groupList->sqlOrderBy = 'groupName';
                $groupList->readObjects();
                $groups = $groupList->getObjects();
                foreach ($groups as &$group) {
@@ -59,6 +60,7 @@ class LabelCacheBuilder extends AbstractCacheBuilder {
                if (count($groupList)) {
                        // get labels
                        $labelList = new LabelList();
+                       $labelList->sqlOrderBy = 'label';
                        $labelList->readObjects();
                        foreach ($labelList as $label) {
                                $data['groups'][$label->groupID]->addLabel($label);