Bug 3428: Alphabetizes the collection codes in the Advanced Search.
authorGarry Collum <gcollum@gmail.com>
Sun, 19 Jul 2009 00:02:24 +0000 (20:02 -0400)
committerGalen Charlton <galen.charlton@liblime.com>
Tue, 21 Jul 2009 01:24:54 +0000 (21:24 -0400)
If the advancedSearchTypes = CCODE, the code descriptions are not alphabetized, as opposed to itemtypes, which are alphabetized.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
catalogue/search.pl
opac/opac-search.pl

index 336e12f..33da2b0 100755 (executable)
@@ -239,7 +239,7 @@ if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') {
     $template->param(itemtypeloop => \@itemtypesloop);
 } else {
     my $advsearchtypes = GetAuthorisedValues($advanced_search_types);
-    for my $thisitemtype (@$advsearchtypes) {
+    for my $thisitemtype (sort {$a->{'lib'} cmp $b->{'lib'}} @$advsearchtypes) {
         my %row =(
                 number=>$cnt++,
                 ccl => $advanced_search_types,
index 798a253..7169106 100755 (executable)
@@ -145,7 +145,7 @@ if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') {
        }
 } else {
     my $advsearchtypes = GetAuthorisedValues($advanced_search_types);
-       for my $thisitemtype (@$advsearchtypes) {
+       for my $thisitemtype (sort {$a->{'lib'} cmp $b->{'lib'}} @$advsearchtypes) {
                my %row =(
                                number=>$cnt++,
                                ccl => $advanced_search_types,