From 272b0c63918bb7ea5774c6caf2314f18aec0ea61 Mon Sep 17 00:00:00 2001 From: shedges Date: Tue, 17 Aug 2004 20:50:41 +0000 Subject: [PATCH] added MARC notes array and MARC subjects array to values sent to template. --- opac/opac-detail.pl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 84c7131383..5b92764b40 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -7,6 +7,8 @@ use C4::Auth; use C4::Bull; #uses getsubscriptionfrom biblionumber use C4::Interface::CGI::Output; use HTML::Template; +use C4::Biblio; +use C4::SearchMarc; my $query=new CGI; my ($template, $borrowernumber, $cookie) @@ -44,6 +46,19 @@ foreach my $itm (@items) { $template->param(norequests => $norequests); + ## get notes and subjects from MARC record +my $marc = C4::Context->preference("marc"); +if ($marc eq "yes") { + my $dbh = C4::Context->dbh; + my $bibid = &MARCfind_MARCbibid_from_oldbiblionumber($dbh,$biblionumber); + my $marcflavour = C4::Context->preference("marcflavour"); + my $marcnotesarray = &getMARCnotes($dbh,$bibid,$marcflavour); + my $marcsubjctsarray = &getMARCsubjects($dbh,$bibid,$marcflavour); + + $template->param(MARCNOTES => $marcnotesarray); + $template->param(MARCSUBJCTS => $marcsubjctsarray); +} + my @results = ($dat,); my $resultsarray=\@results; @@ -59,4 +74,3 @@ $template->param(BIBLIO_RESULTS => $resultsarray, ); output_html_with_http_headers $query, $cookie, $template->output; - -- 2.20.1