aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggMenuBuilder.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-24 01:27:47 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-24 01:27:47 +0000
commitc667ce609dc3c1f9f071e39293f8c176d3e1c5dc (patch)
tree1ec44df08297b396809af545dcf9568ba7c27aff /engine/classes/ElggMenuBuilder.php
parent64547b21f0e0cb4efc55212a5a6ae92824b274aa (diff)
downloadelgg-c667ce609dc3c1f9f071e39293f8c176d3e1c5dc.tar.gz
elgg-c667ce609dc3c1f9f071e39293f8c176d3e1c5dc.tar.bz2
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
Diffstat (limited to 'engine/classes/ElggMenuBuilder.php')
-rw-r--r--engine/classes/ElggMenuBuilder.php12
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);
}