Bug 10283: Hide "many items" on second tab when using OpacSeparateHoldings
[koha.git] / catalogue / MARCdetail.pl
index 0490076..835568a 100755 (executable)
@@ -82,7 +82,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     }
 );
 
-my $record = GetMarcBiblio($biblionumber);
+my $record = GetMarcBiblio($biblionumber, 1);
 $template->param( ocoins => GetCOinSBiblio($record) );
 
 if ( not defined $record ) {
@@ -177,7 +177,7 @@ for ( my $tabloop = 0 ; $tabloop <= 10 ; $tabloop++ ) {
 
             # loop through each subfield
             for my $i ( 0 .. $#subf ) {
-                $subf[$i][0] = "@" unless $subf[$i][0];
+                $subf[$i][0] = "@" unless defined $subf[$i][0];
                 next
                   if (
                     $tagslib->{ $fields[$x_i]->tag() }->{ $subf[$i][0] }->{tab}
@@ -333,6 +333,10 @@ $template->param (
        marcview => 1,
        z3950_search_params             => C4::Search::z3950_search_args($biblio),
        C4::Search::enabled_staff_search_views,
+    searchid            => $query->param('searchid'),
 );
 
+my ( $holdcount, $holds ) = C4::Reserves::GetReservesFromBiblionumber($biblionumber,1);
+$template->param( holdcount => $holdcount, holds => $holds );
+
 output_html_with_http_headers $query, $cookie, $template->output;