[open-ils-commits] r15655 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Search (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Mar 2 13:39:40 EST 2010
Author: dbs
Date: 2010-03-02 13:39:36 -0500 (Tue, 02 Mar 2010)
New Revision: 15655
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
Log:
Sort Z39.50 sources as returned by fetch_service_defs() for a better UX
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2010-03-02 18:03:18 UTC (rev 15654)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2010-03-02 18:39:36 UTC (rev 15655)
@@ -149,7 +149,15 @@
};
%services = %$hash; # cache these internally so we can actually use the db-configured sources
- return $hash;
+
+ # Return a sorted list for easier handling in the client
+ my @sorted_sources;
+ foreach my $zsource (sort keys %$hash) {
+ if ($hash->{$zsource}->{name}) {
+ push @sorted_sources, $hash->{$zsource};
+ }
+ }
+ return \@sorted_sources;
}
More information about the open-ils-commits
mailing list