koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] Changes to koha/opac/opac-search.pl [rel_2_2]


From: paul poulain
Subject: [Koha-cvs] Changes to koha/opac/opac-search.pl [rel_2_2]
Date: Thu, 01 Dec 2005 08:59:11 -0500

Index: koha/opac/opac-search.pl
diff -u koha/opac/opac-search.pl:1.21.2.6 koha/opac/opac-search.pl:1.21.2.7
--- koha/opac/opac-search.pl:1.21.2.6   Wed Sep 28 15:48:25 2005
+++ koha/opac/opac-search.pl    Thu Dec  1 13:59:11 2005
@@ -39,22 +39,21 @@
        my @excluding = $query->param('excluding');
        my @operator = $query->param('operator');
        my @value = $query->param('value');
+       my $orderby = $query->param('orderby');
+       my $desc_or_asc = $query->param('desc_or_asc');
+       my $exactsearch = $query->param('exact');
 
        for (my $i=0;$i<=$#marclist;$i++) {
                if ($searchdesc) { # don't put the and_or on the 1st search term
-                       $searchdesc .= $and_or[$i]." ".$excluding[$i]." 
".($marclist[$i]?$marclist[$i]:"*")." ".$operator[$i]." ".$value[$i]." " if 
($value[$i]);
+                       $searchdesc .= $and_or[$i].$excluding[$i]." 
".($marclist[$i]?$marclist[$i]:"*").$operator[$i].$value[$i] if ($value[$i]);
                } else {
-                       $searchdesc = $excluding[$i]." 
".($marclist[$i]?$marclist[$i]:"*")." ".$operator[$i]." ".$value[$i]." " if 
($value[$i]);
+                       $searchdesc = 
$excluding[$i].($marclist[$i]?$marclist[$i]:"*").$operator[$i].$value[$i] if 
($value[$i]);
                }
        }
        $resultsperpage= $query->param('resultsperpage');
        $resultsperpage = 19 if(!defined $resultsperpage);
        
-       my $orderby = $query->param('orderby');
-       my $desc_or_asc = $query->param('desc_or_asc');
-       my $exactsearch = $query->param('exact');
        if ($exactsearch) {
-               warn "EXACT";
                foreach (@operator) {
                        $_='=';
                }
@@ -114,7 +113,8 @@
                push @field_data, { term => "operator", val=>$operator[$i] };
                push @field_data, { term => "value", val=>$value[$i] };
        }
-
+       push @field_data, {term => "desc_or_asc", val => $desc_or_asc} if 
$desc_or_asc;
+       push @field_data, {term => "orderby", val => $orderby} if $orderby;
        my @numbers = ();
 
        if ($total>$resultsperpage)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]