[Koha-patches] [PATCH] Bug 3428: Alphabetizes the collection codes in the Advanced Search.
Garry Collum
gcollum at gmail.com
Sun Jul 19 02:02:24 CEST 2009
If the advancedSearchTypes = CCODE, the code descriptions are not alphabetized, as opposed to itemtypes, which are alphabetized.
---
catalogue/search.pl | 2 +-
opac/opac-search.pl | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/catalogue/search.pl b/catalogue/search.pl
index 336e12f..33da2b0 100755
--- a/catalogue/search.pl
+++ b/catalogue/search.pl
@@ -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,
diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index 538ec9c..20d06f5 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -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,
--
1.5.6.5
More information about the Koha-patches
mailing list