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);
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'},
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"};
$template->param(ShowOpacRecentSearchLink => 1);
}
+ shift @recentSearches if (@recentSearches > 15);
# Pushing the cookie back
$newsearchcookie = $cgi->cookie(
-name => 'KohaOpacRecentSearches',