diff options
| author | Greg Roach <fisharebest@gmail.com> | 2015-01-22 00:41:36 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2015-01-22 00:41:36 +0000 |
| commit | 4d41a196c4b4fb45e333c217dfc25beded8236e5 (patch) | |
| tree | 43e8a2f17ca34d9fd4742faf764f0e3f413c5cf9 | |
| parent | f9b00ec7d7d9a1143aed28a89c0c3b440b941065 (diff) | |
| download | webtrees-4d41a196c4b4fb45e333c217dfc25beded8236e5.tar.gz webtrees-4d41a196c4b4fb45e333c217dfc25beded8236e5.tar.bz2 webtrees-4d41a196c4b4fb45e333c217dfc25beded8236e5.zip | |
Fix #333 - sorting of modules
| -rw-r--r-- | library/WT/Module.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/WT/Module.php b/library/WT/Module.php index 1544480b8b..721b9bf212 100644 --- a/library/WT/Module.php +++ b/library/WT/Module.php @@ -217,8 +217,8 @@ abstract class WT_Module { } } if ($sort && !$sorted) { - $sorted = uasort($modules, function(WT_Module $x, WT_MOdule $y) { - return WT_I18N::strcasecmp((string) $x, (string) $y); + $sorted = uasort($modules, function(WT_Module $x, WT_Module $y) { + return WT_I18N::strcasecmp($x->getTitle(), $y->getTitle()); }); } @@ -269,7 +269,7 @@ abstract class WT_Module { // The order of some modules is defined by the user. Others are sorted by name. if ($component !== 'menu' && $component !== 'sidebar' && $component !== 'tab') { uasort($array, function(WT_Module $x, WT_Module $y) { - return WT_I18N::strcasecmp((string) $x, (string) $y); + return WT_I18N::strcasecmp($x->getTitle(), $y->getTitle()); }); } |
