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:
Bharat Mediratta
2012-06-11 14:02:23 -07:00
parent 8e74750dc2
commit e4daa42830
+8 -4
View File
@@ -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.
*/