summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries/Menu.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/libraries/Menu.php')
-rw-r--r--modules/gallery/libraries/Menu.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/gallery/libraries/Menu.php b/modules/gallery/libraries/Menu.php
index 3ad6ebef..a29a9905 100644
--- a/modules/gallery/libraries/Menu.php
+++ b/modules/gallery/libraries/Menu.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2010 Bharat Mediratta
+ * Copyright (C) 2000-2011 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -223,12 +223,13 @@ class Menu_Core extends Menu_Element {
/**
* Retrieve a Menu_Element by id
*/
- public function get($id) {
+ public function &get($id) {
if (array_key_exists($id, $this->elements)) {
return $this->elements[$id];
}
- return null;
+ $null = null;
+ return $null;
}
public function is_empty() {
@@ -249,4 +250,8 @@ class Menu_Core extends Menu_Element {
$view->menu = $this;
return $view;
}
+
+ static function title_comparator($a, $b) {
+ return strnatcasecmp((string)$a->label, (string)$b->label);
+ }
}