diff options
| author | mamouneyya <mamoun.diraneyya@gmail.com> | 2011-02-16 18:25:18 +0300 |
|---|---|---|
| committer | mamouneyya <mamoun.diraneyya@gmail.com> | 2011-02-16 18:25:18 +0300 |
| commit | 00772aaa62e6bce14e58e163ea72f386136c731d (patch) | |
| tree | ed658d454d8bea79d551969fffa0bc18faee5d52 /modules/gallery/libraries/Menu.php | |
| parent | 3e2610ea83c60805d5e727df6509da6c49fd6c7b (diff) | |
| parent | d2c77fd0590501f7b6b51d9f4cc033ed9485b082 (diff) | |
Merge remote-tracking branch 'gallery3/master'
Diffstat (limited to 'modules/gallery/libraries/Menu.php')
| -rw-r--r-- | modules/gallery/libraries/Menu.php | 11 |
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); + } } |
