summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/module.php
diff options
context:
space:
mode:
authorNathan Kinkade <nath@nkinka.de>2012-06-18 16:17:55 +0000
committerNathan Kinkade <nath@nkinka.de>2012-06-18 16:17:55 +0000
commit527bc809aaa6d48e7c1a7be50de31a4c3adcee90 (patch)
treefb7432e06af9191f2300af97685f235325d36f57 /modules/gallery/helpers/module.php
parentb52e834bd0bab530e98537d52b31d4b37f199739 (diff)
parentc48df3b8199802a75f30f38c6f7b3440f9fde4ca (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/helpers/module.php')
-rw-r--r--modules/gallery/helpers/module.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php
index 7292b106..e4f41d3d 100644
--- a/modules/gallery/helpers/module.php
+++ b/modules/gallery/helpers/module.php
@@ -110,10 +110,7 @@ class module_Core {
$identity_module = module::get_var("gallery", "identity_provider", "user");
$modules->$identity_module->locked = true;
- function natural_name_sort($a, $b) {
- return strnatcasecmp($a->name, $b->name);
- }
- $modules->uasort('natural_name_sort');
+ $modules->uasort(array("module", "module_comparator"));
self::$available = $modules;
}
@@ -121,6 +118,13 @@ class module_Core {
}
/**
+ * Natural name sort comparator
+ */
+ static function module_comparator($a, $b) {
+ return strnatcasecmp($a->name, $b->name);
+ }
+
+ /**
* Return a list of all the active modules in no particular order.
*/
static function active() {