From beeb70832e8ec798a7c1d8951cba0690224dd901 Mon Sep 17 00:00:00 2001 From: Mason James Date: Mon, 11 Feb 2008 18:51:09 +1300 Subject: [PATCH] now fetching missing MARCSERIES/440 values too. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- catalogue/detail.pl | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 2ec9c2b7c7..2ee1b3740a 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -34,6 +34,8 @@ use C4::Serials; use C4::XISBN qw(get_xisbns get_biblio_from_xisbn); use C4::Amazon; +# use Smart::Comments; + my $query = new CGI; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { @@ -48,6 +50,14 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my $biblionumber = $query->param('biblionumber'); my $fw = GetFrameworkCode($biblionumber); +## get notes and subjects from MARC record +my $marcflavour = C4::Context->preference("marcflavour"); +my $record = GetMarcBiblio($biblionumber); +my $marcnotesarray = GetMarcNotes( $record, $marcflavour ); +my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); +my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); +my $marcseriesarray = GetMarcSeries($record,$marcflavour); + # Get Branches, Itemtypes and Locations my $branches = GetBranches(); my $itemtypes = GetItemTypes(); @@ -74,6 +84,8 @@ if (!$dat) { my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber); my @subscriptions = GetSubscriptions( $dat->{title}, $dat->{issn}, $biblionumber ); + + my @subs; foreach my $subscription (@subscriptions) { my %cell; @@ -143,17 +155,11 @@ foreach my $item (@items) { $template->param( norequests => $norequests ); -## get notes and subjects from MARC record - my $marcflavour = C4::Context->preference("marcflavour"); - my $record = GetMarcBiblio($biblionumber); - my $marcnotesarray = GetMarcNotes( $record, $marcflavour ); - my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); - my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); - $template->param( MARCNOTES => $marcnotesarray, MARCSUBJCTS => $marcsubjctsarray, - MARCAUTHORS => $marcauthorsarray + MARCAUTHORS => $marcauthorsarray, + MARCSERIES => $marcseriesarray ); my @results = ( $dat, ); -- 2.39.5