(bug #4051) add due date in overdue.tmpl
[koha.git] / opac / opac-detail.pl
index 0fec800..5940fb0 100755 (executable)
@@ -60,13 +60,18 @@ my $biblionumber = $query->param('biblionumber') || $query->param('bib');
 
 $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
 $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
+$template->param(C4::Search::enabled_opac_search_views);
 
 my $record       = GetMarcBiblio($biblionumber);
+if ( ! $record ) {
+    print $query->redirect("/cgi-bin/koha/errors/404.pl");
+    exit;
+}
 $template->param( biblionumber => $biblionumber );
 # XSLT processing of some stuff
 if (C4::Context->preference("XSLTDetailsDisplay") ) {
     $template->param(
-        'XSLTBloc' => XSLTParse4Display($biblionumber, $record, 'Detail') );
+        'XSLTBloc' => XSLTParse4Display($biblionumber, $record, C4::Context->preference("XSLTDetailsDisplay")) );
 }
 
 # change back when ive fixed request.pl
@@ -82,10 +87,6 @@ if (C4::Context->preference('hidelostitems')) {
 }
 my $dat = &GetBiblioData($biblionumber);
 
-if (!$dat) {
-    print $query->redirect("/cgi-bin/koha/errors/404.pl");
-    exit;
-}
 my $itemtypes = GetItemTypes();
 # imageurl:
 my $itemtype = $dat->{'itemtype'};
@@ -182,7 +183,7 @@ my $marcauthorsarray = GetMarcAuthors   ($record,$marcflavour);
 my $marcsubjctsarray = GetMarcSubjects  ($record,$marcflavour);
 my $marcseriesarray  = GetMarcSeries    ($record,$marcflavour);
 my $marcurlsarray    = GetMarcUrls      ($record,$marcflavour);
-my $subtitle         = C4::Biblio::get_koha_field_from_marc('bibliosubtitle', 'subtitle', $record, '');
+my $subtitle         = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber));
 
     $template->param(
                      normalized_oclc         => GetNormalizedOCLCNumber($record,$marcflavour),