summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/module.php
diff options
context:
space:
mode:
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() {