X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=opac%2Fopac-search.pl;h=778c7ca84f94cd0a728a55549dd12ae1a0a3b360;hb=d31c1603cca45c4f4b5b9fa8b2a1785e81f6da05;hp=c145729d7e95ce773b336e344093dde4349c7123;hpb=091d3100169a12e9498f6d58c8b61ac01a5a5db6;p=koha.git diff --git a/opac/opac-search.pl b/opac/opac-search.pl index c145729d7e..778c7ca84f 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -84,6 +84,9 @@ else { authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ), } ); +if ($template_name eq 'opac-results.tmpl') { + $template->param('COinSinOPACResults' => C4::Context->preference('COinSinOPACResults')); +} if ($format eq 'rss2' or $format eq 'opensearchdescription' or $format eq 'atom') { $template->param($format => 1); @@ -161,8 +164,8 @@ my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes"); if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') { foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) { - my %row =( number=>$cnt++, - ccl => $itype_or_itemtype, + my %row =( number=>$cnt++, + ccl => "$itype_or_itemtype,phr", code => $thisitemtype, selected => $selected, description => $itemtypes->{$thisitemtype}->{'description'}, @@ -468,9 +471,11 @@ for (my $i=0;$i<@servers;$i++) { limit=>$tag_quantity }); } } - foreach (@newresults) { - $_->{coins} = GetCOinSBiblio($_->{'biblionumber'}); - } + if (C4::Context->preference('COinSinOPACResults')) { + foreach (@newresults) { + $_->{coins} = GetCOinSBiblio($_->{'biblionumber'}); + } + } if ($results_hashref->{$server}->{"hits"}){ $total = $total + $results_hashref->{$server}->{"hits"}; @@ -504,6 +509,7 @@ for (my $i=0;$i<@servers;$i++) { $template->param(ShowOpacRecentSearchLink => 1); } + shift @recentSearches if (@recentSearches > 15); # Pushing the cookie back $newsearchcookie = $cgi->cookie( -name => 'KohaOpacRecentSearches',