summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/module.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2012-05-11 17:14:41 -0700
committerBharat Mediratta <bharat@menalto.com>2012-05-11 17:14:41 -0700
commit5d9e71741754809ebe5f543eb874634e6fc8cc9d (patch)
tree49fec599435723ba53e318f46a5da398ed8f2431 /modules/gallery/helpers/module.php
parent6aebc2598e0b76e560a68d6ea78bd59012ae0805 (diff)
Sort modules by visible name, not id. Fixes #1859.
Diffstat (limited to 'modules/gallery/helpers/module.php')
-rw-r--r--modules/gallery/helpers/module.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php
index 3368e39b..7292b106 100644
--- a/modules/gallery/helpers/module.php
+++ b/modules/gallery/helpers/module.php
@@ -109,7 +109,11 @@ class module_Core {
$modules->gallery->locked = true;
$identity_module = module::get_var("gallery", "identity_provider", "user");
$modules->$identity_module->locked = true;
- $modules->ksort();
+
+ function natural_name_sort($a, $b) {
+ return strnatcasecmp($a->name, $b->name);
+ }
+ $modules->uasort('natural_name_sort');
self::$available = $modules;
}