Bug 1633: [SIGNED-OFF] Display local cover images
[koha.git] / catalogue / detail.pl
index 3c95ba2..fcf1f2b 100755 (executable)
@@ -37,6 +37,7 @@ use C4::External::Amazon;
 use C4::Search;                # enabled_staff_search_views
 use C4::VirtualShelves;
 use C4::XSLT;
+use C4::Images;
 
 # use Smart::Comments;
 
@@ -384,6 +385,11 @@ if ( C4::Context->preference("AmazonEnabled") == 1 ) {
     }
 }
 
+if ( C4::Context->preference("LocalCoverImages") == 1 ) {
+    my @images = ListImagesForBiblio($biblionumber);
+    $template->{VARS}->{localimages} = \@images;
+}
+
 # Get OPAC URL
 if (C4::Context->preference('OPACBaseURL')){
      $template->param( OpacUrl => C4::Context->preference('OPACBaseURL') );