[Koha-patches] [PATCH] [3.0.x](bug #3549) Sorted framework options in the dropdown menu

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Wed Aug 26 01:44:36 CEST 2009


From: Jean-André Santoni <jeanandre.santoni at biblibre.com>

In addbook.pl, the framwork options are sorted in random order. They should be
sorted in alphabetical order of value or code.
---
 cataloguing/addbooks.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cataloguing/addbooks.pl b/cataloguing/addbooks.pl
index 00ccd7a..ffb844a 100755
--- a/cataloguing/addbooks.pl
+++ b/cataloguing/addbooks.pl
@@ -57,7 +57,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
 # get framework list
 my $frameworks = getframeworks;
 my @frameworkcodeloop;
-foreach my $thisframeworkcode ( keys %{$frameworks} ) {
+foreach my $thisframeworkcode ( sort {$frameworks->{$a} cmp $frameworks->{$b}}keys %{$frameworks} ) {
     push @frameworkcodeloop, {
         value         => $thisframeworkcode,
         frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'},
-- 
1.6.0.4




More information about the Koha-patches mailing list