diff options
| author | Greg Roach <fisharebest@gmail.com> | 2015-05-05 14:25:23 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2015-05-05 14:25:23 +0100 |
| commit | 9e8078a6b4bfdb4e614f6683aed81b0ea73b9aaf (patch) | |
| tree | 49efc46f8e60c45c11b60126509d8082d8a08ead /app/Module.php | |
| parent | 7b53b5bd54b4455b988cea902fab731044f23894 (diff) | |
| download | webtrees-9e8078a6b4bfdb4e614f6683aed81b0ea73b9aaf.tar.gz webtrees-9e8078a6b4bfdb4e614f6683aed81b0ea73b9aaf.tar.bz2 webtrees-9e8078a6b4bfdb4e614f6683aed81b0ea73b9aaf.zip | |
Fix #560 - wrong order for menus, blocks, etc.
Diffstat (limited to 'app/Module.php')
| -rw-r--r-- | app/Module.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/Module.php b/app/Module.php index 0d044d4caf..aa0c0473f5 100644 --- a/app/Module.php +++ b/app/Module.php @@ -91,6 +91,13 @@ class Module { } } + // The order of menus/sidebars/tabs is defined in the database. Others are sorted by name. + if ($component !== 'menu' && $component !== 'sidebar' && $component !== 'tab') { + uasort($array, function(AbstractModule $x, AbstractModule $y) { + return I18N::strcasecmp($x->getTitle(), $y->getTitle()); + }); + } + return $array; } |
