why was title ordering on 1=36 ? in ccl.properties, it s 1=4. (1=36 being for title...
authortipaul <tipaul>
Tue, 26 Jun 2007 09:20:21 +0000 (09:20 +0000)
committertipaul <tipaul>
Tue, 26 Jun 2007 09:20:21 +0000 (09:20 +0000)
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
C4/Search.pm

index 7232153..2fe06cf 100644 (file)
@@ -791,8 +791,8 @@ sub displaySortby {
             value => "1=32 &lt;i",
             label => "&nbsp;&nbsp;&nbsp;Acquisition Date: Oldest to Newest"
         },
-        { value => "1=36 &lt;i", label => "Title (A-Z)" },
-        { value => "1=36 &gt;i", label => "Title (Z-A)" },
+        { value => "1=4 &lt;i", label => "Title (A-Z)" },
+        { value => "1=4 &gt;i", label => "Title (Z-A)" },
     ];
     for my $hash (@$sort_by_loop) {
 
index 1af36e3..526bc9d 100755 (executable)
@@ -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};
             }