Modules Name Sorting patch
James Nash <[email protected]>
| Newsgroups | gmane.comp.web.gallery.devel |
|---|---|
| Message-ID | <[email protected]> |
Can I propose this patch for the sorting of modules by their name vs. their
filename. Makes looking through the list a lot more appealing.
Thanks,
James (jnash)
--- /data/archives/g3-git/gallery3/modules/gallery/helpers/module.php
2012-02-28 13:28:18.000000000 -0500
+++ /data/apache/htdocs/gallery/modules/gallery/helpers/module.php
2012-05-08 10:45:39.000000000 -0400
@@ -109,7 +109,12 @@
$modules->gallery->locked = true;
$identity_module = module::get_var("gallery", "identity_provider",
"user");
$modules->$identity_module->locked = true;
- $modules->ksort();
+
+ function cmp($a, $b) {
+ return strcmp(strtolower($a->name), strtolower($b->name));
+ }
+
+ $modules->uasort('cmp');
self::$available = $modules;
}
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
__[ g a l l e r y - d e v e l ]_________________________
[ list info/archive --> http://gallery.sf.net/lists.php ]
[ gallery info/FAQ/download --> http://gallery.sf.net ]