From 3e87f37216614ed832daf6d18f1ba8cf065db84a Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 26 Jun 2007 09:20:21 +0000 Subject: [PATCH] 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 --- C4/Koha.pm | 4 ++-- C4/Search.pm | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index 72321537bf..2fe06cfca9 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -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) { diff --git a/C4/Search.pm b/C4/Search.pm index 1af36e31ea..526bc9d2f0 100755 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -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 {'RECORDS'}[$numbers++] = $result{$key}; } -- 2.39.5