Bug 9218: fix intranet cart email for non english templates
[koha.git] / opac / opac-detail.pl
index 0b5ef8c..41de4fd 100755 (executable)
@@ -154,6 +154,7 @@ if ($session->param('busc')) {
 
         my $expanded_facet = $arrParamsBusc->{'expand'};
         my $branches = GetBranches();
+        my $itemtypes = GetItemTypes;
         my @servers;
         @servers = @{$arrParamsBusc->{'server'}} if $arrParamsBusc->{'server'};
         @servers = ("biblioserver") unless (@servers);
@@ -164,7 +165,7 @@ if ($session->param('busc')) {
         $sort_by[0] = $default_sort_by if !$sort_by[0] && defined($default_sort_by);
         my ($error, $results_hashref, $facets);
         eval {
-            ($error, $results_hashref, $facets) = getRecords($arrParamsBusc->{'query'},$arrParamsBusc->{'simple_query'},\@sort_by,\@servers,$results_per_page,$offset,$expanded_facet,$branches,$arrParamsBusc->{'query_type'},$arrParamsBusc->{'scan'});
+            ($error, $results_hashref, $facets) = getRecords($arrParamsBusc->{'query'},$arrParamsBusc->{'simple_query'},\@sort_by,\@servers,$results_per_page,$offset,$expanded_facet,$branches,$itemtypes,$arrParamsBusc->{'query_type'},$arrParamsBusc->{'scan'});
         };
         my $hits;
         my @newresults;
@@ -630,7 +631,10 @@ if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) {
 # TODO: The limit of 50 could be a syspref
 my $viewallitems = $query->param('viewallitems');
 if (scalar(@itemloop) >= 50 && !$viewallitems) {
-    $template->param('lotsofitems' => 1);
+    $template->param('lotsofholdingsitems' => 1);
+}
+if (scalar(@otheritemloop) >= 50 && !$viewallitems) {
+    $template->param('lotsofothersholdingsitems' => 1);
 }
 
 ## get notes and subjects from MARC record
@@ -931,6 +935,7 @@ if (C4::Context->preference("OPACShelfBrowser")) {
         my $nearby = GetNearbyItems($starting_itemnumber);
 
         $template->param(
+            starting_itemnumber => $starting_itemnumber,
             starting_homebranch => $nearby->{starting_homebranch}->{description},
             starting_location => $nearby->{starting_location}->{description},
             starting_ccode => $nearby->{starting_ccode}->{description},