From c667ce609dc3c1f9f071e39293f8c176d3e1c5dc Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 24 Feb 2011 01:27:47 +0000 Subject: Refs #2997 switching from title to text for menu items git-svn-id: http://code.elgg.org/elgg/trunk@8455 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/classes/ElggMenuBuilder.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'engine/classes/ElggMenuBuilder.php') 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); } -- cgit v1.2.3