Bug 7298: (follow-up) fix uninitialized variable warning
[koha.git] / catalogue / imageviewer.pl
index 011dfab..c96e5af 100755 (executable)
@@ -41,7 +41,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
 
 my $biblionumber = $query->param('biblionumber') || $query->param('bib');
 my $imagenumber = $query->param('imagenumber');
-my ( $count, $biblio ) = GetBiblio($biblionumber);
+my $biblio = GetBiblio($biblionumber);
 my $itemcount = GetItemsCount($biblionumber);
 
 my @items = GetItemsInfo($biblionumber);
@@ -78,4 +78,7 @@ $template->{VARS}->{'norequests'}   = $norequests;
 $template->param(C4::Search::enabled_staff_search_views);
 $template->{VARS}->{'biblio'} = $biblio;
 
+my ( $holdcount, $holds ) = C4::Reserves::GetReservesFromBiblionumber($biblionumber,1);
+$template->param( holdcount => $holdcount, holds => $holds );
+
 output_html_with_http_headers $query, $cookie, $template->output;