koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/search.marc search.pl,1.22,1.23


From: Owen Leonard
Subject: [Koha-cvs] CVS: koha/search.marc search.pl,1.22,1.23
Date: Thu, 03 Feb 2005 12:48:24 -0800

Update of /cvsroot/koha/koha/search.marc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26689/search.marc

Modified Files:
        search.pl 
Log Message:
Copying code from opac-search.pl that allows search terms to be output along 
with search results ("You searched for...")  Add <!-- TMPL_VAR 
NAME="searchdesc" --> to template to take advantage of this change.

Index: search.pl
===================================================================
RCS file: /cvsroot/koha/koha/search.marc/search.pl,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** search.pl   8 Dec 2004 20:57:58 -0000       1.22
--- search.pl   3 Feb 2005 20:48:22 -0000       1.23
***************
*** 99,102 ****
--- 99,103 ----
  $startfrom=0 if(!defined $startfrom);
  my ($template, $loggedinuser, $cookie);
+ my $searchdesc;
  my $resultsperpage;
  
***************
*** 108,111 ****
--- 109,120 ----
        my @value = $query->param('value');
  
+               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]);
+                       } else {
+                       $searchdesc = $excluding[$i]." 
".($marclist[$i]?$marclist[$i]:"*")." ".$operator[$i]." ".$value[$i]." " if 
($value[$i]);
+                       }
+               }
+       
        $resultsperpage= $query->param('resultsperpage');
        $resultsperpage = 19 if(!defined $resultsperpage);
***************
*** 195,198 ****
--- 204,208 ----
                                                        to=>$to,
                                                        numbers=>address@hidden,
+                                                       searchdesc=> 
$searchdesc,
                                                        MARC_ON => 
C4::Context->preference("marc"),
                                                        );




reply via email to

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