adjusting the member dataCategories sortParentChild function
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 5 Jul 2017 16:16:35 +0000 (12:16 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 5 Jul 2017 16:16:35 +0000 (12:16 -0400)
the sortparentchild function needed to add the tilde to the category name,
children and parent in order to sort categories that are similar in name that end
with different numbers.

classes/data/dataCategories.php

index 2e8ed10..6c73aad 100644 (file)
@@ -429,14 +429,14 @@ class GlmDataCategories extends GlmDataAbstract
             $aVal = $a[$parent]['name'].'~~~'.$a['name'];
             } else {
             // Otheriwse just use the name.
-            $aVal = $a['name'];
+            $aVal = $a['name'].'~~~';
             }
 
             // Same for b value
             if ($b[$parent]['value']) {
             $bVal = $b[$parent]['name'].'~~~'.$b['name'];
             } else {
-            $bVal = $b['name'];
+            $bVal = $b['name'].'~~~';
             }
 
             if ($aVal > $bVal) {