diff options
Diffstat (limited to 'engine/classes/ElggMenuBuilder.php')
-rw-r--r-- | engine/classes/ElggMenuBuilder.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engine/classes/ElggMenuBuilder.php b/engine/classes/ElggMenuBuilder.php index 33abc0c6b..4f9e7b447 100644 --- a/engine/classes/ElggMenuBuilder.php +++ b/engine/classes/ElggMenuBuilder.php @@ -176,8 +176,8 @@ class ElggMenuBuilder { ksort($this->menu); switch ($sort_by) { - case 'title': - $sort_callback = array('ElggMenuBuilder', 'compareByTitle'); + case 'text': + $sort_callback = array('ElggMenuBuilder', 'compareByText'); break; case 'name': $sort_callback = array('ElggMenuBuilder', 'compareByName'); @@ -221,15 +221,15 @@ class ElggMenuBuilder { } /** - * Compare two menu items by their titles + * Compare two menu items by their display text * * @param ElggMenuItem $a * @param ElggMenuItem $b * @return bool */ - public static function compareByTitle($a, $b) { - $a = $a->getTitle(); - $b = $b->getTitle(); + public static function compareByText($a, $b) { + $a = $a->getText(); + $b = $b->getText(); return strnatcmp($a, $b); } |