(bug #3549) Sorted framework options in the dropdown menu
authorJean-André Santoni <jeanandre.santoni@biblibre.com>
Tue, 25 Aug 2009 23:44:36 +0000 (01:44 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 30 Sep 2009 09:30:06 +0000 (11:30 +0200)
In addbook.pl, the framwork options are sorted in random order. They should be
sorted in alphabetical order of value or code.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
cataloguing/addbooks.pl

index 68367f7..8ee8868 100755 (executable)
@@ -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'},