From 534fe7fb6ff3a5bbc065c877e9a222ba38de846e Mon Sep 17 00:00:00 2001 From: oleonard Date: Thu, 3 Feb 2005 20:48:22 +0000 Subject: [PATCH] Copying code from opac-search.pl that allows search terms to be output along with search results ("You searched for...") Add to template to take advantage of this change. --- search.marc/search.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/search.marc/search.pl b/search.marc/search.pl index e96d73c37d..a6cc20037e 100755 --- a/search.marc/search.pl +++ b/search.marc/search.pl @@ -98,6 +98,7 @@ my $dbh = C4::Context->dbh; my $startfrom=$query->param('startfrom'); $startfrom=0 if(!defined $startfrom); my ($template, $loggedinuser, $cookie); +my $searchdesc; my $resultsperpage; if ($op eq "do_search") { @@ -107,6 +108,14 @@ if ($op eq "do_search") { my @operator = $query->param('operator'); 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); my $orderby = $query->param('orderby'); @@ -194,6 +203,7 @@ if ($op eq "do_search") { from=>$from, to=>$to, numbers=>\@numbers, + searchdesc=> $searchdesc, MARC_ON => C4::Context->preference("marc"), ); -- 2.39.5