why was title ordering on 1=36 ? in ccl.properties, it s 1=4. (1=36 being for title-cover)
thus, the title sorting was not working. This commit fixes the problem. LIBLIME : verify I am right in the analysis and in the fix, it is a part mostly written by joshua
This commit is contained in:
parent
8b29900d24
commit
3e87f37216
|
|
@ -791,8 +791,8 @@ sub displaySortby {
|
|||
value => "1=32 <i",
|
||||
label => " Acquisition Date: Oldest to Newest"
|
||||
},
|
||||
{ value => "1=36 <i", label => "Title (A-Z)" },
|
||||
{ value => "1=36 >i", label => "Title (Z-A)" },
|
||||
{ value => "1=4 <i", label => "Title (A-Z)" },
|
||||
{ value => "1=4 >i", label => "Title (Z-A)" },
|
||||
];
|
||||
for my $hash (@$sort_by_loop) {
|
||||
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ sub getRecords {
|
|||
$expanded_facet, $branches, $query_type,
|
||||
$scan
|
||||
) = @_;
|
||||
|
||||
warn "Query : $koha_query";
|
||||
my @servers = @$servers_ref;
|
||||
my @sort_by = @$sort_by_ref;
|
||||
|
||||
|
|
@ -1427,7 +1427,7 @@ sub NZorder {
|
|||
#
|
||||
# ORDER BY title
|
||||
#
|
||||
} elsif ($ordering =~ /1=36/) {
|
||||
} elsif ($ordering =~ /1=4/) {
|
||||
# the title is in the biblionumbers string, so we just need to build a hash, sort it and return
|
||||
my %result;
|
||||
foreach (split /;/,$biblionumbers) {
|
||||
|
|
@ -1441,7 +1441,7 @@ sub NZorder {
|
|||
# sort the hash and return the same structure as GetRecords (Zebra querying)
|
||||
my $result_hash;
|
||||
my $numbers=0;
|
||||
if ($ordering eq '1=36 <i') { # sort by title desc
|
||||
if ($ordering eq '1=4 <i') { # sort by title desc
|
||||
foreach my $key (sort (keys %result)) {
|
||||
$result_hash->{'RECORDS'}[$numbers++] = $result{$key};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue