mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-23 07:15:50 -04:00
Rename the comparator to something that makes more sense (to me), and make it static.
Follow-on to 5d9e717417 for #1859.
This commit is contained in:
@@ -110,16 +110,20 @@ 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;
|
||||
}
|
||||
|
||||
return self::$available;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user