koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/opac opac-detail.pl [rel_2_2]


From: Ryan Higgins
Subject: [Koha-cvs] koha/opac opac-detail.pl [rel_2_2]
Date: Tue, 27 Feb 2007 17:27:13 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     Ryan Higgins <rych>     07/02/27 17:27:12

Modified files:
        opac           : opac-detail.pl 

Log message:
        add getMARCaddlAuthors sub

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-detail.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.14.2.20&r2=1.14.2.21

Patches:
Index: opac-detail.pl
===================================================================
RCS file: /sources/koha/koha/opac/opac-detail.pl,v
retrieving revision 1.14.2.20
retrieving revision 1.14.2.21
diff -u -b -r1.14.2.20 -r1.14.2.21
--- opac-detail.pl      7 Jul 2006 21:29:18 -0000       1.14.2.20
+++ opac-detail.pl      27 Feb 2007 17:27:12 -0000      1.14.2.21
@@ -30,7 +30,9 @@
 my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber);
 my ($websitecount, @websites)             = &getwebsites($biblionumber);
 
- #coping with subscriptions
+my $marc = C4::Context->preference("marc");
+
+#coping with subscriptions
  my $subscriptionsnumber = getsubscriptionfrombiblionumber($biblionumber);
  my @subscriptions = 
getsubscriptions($dat->{title},$dat->{issn},$biblionumber);
  my @subs;
@@ -45,11 +47,13 @@
  
 $dat->{'count'address@hidden;
 
-$dat->{'additional'}=$addauthor->[0]->{'author'};
-for (my $i = 1; $i < $authorcount; $i++) {
+# get add'l authors from mysql table if marc support is off.  Otherwise, we'll 
get it from MARC below.
+unless ($marc) {
+       $dat->{'additional'}=$addauthor->[0]->{'author'};
+       for (my $i = 1; $i < $authorcount; $i++) {
         $dat->{'additional'} .= " ; " . $addauthor->[$i]->{'author'};
-} # for
-
+       } # for
+}
 my $norequests = 1;
 foreach my $itm (@items) {
     $norequests = 0 unless (($itm->{'wthdrawn'}) || ($itm->{'itemlost'}) || 
($itm->{'notforloan'} > 0)|| ($itm->{'itemnotforloan'} > 0) 
||(!$itm->{'itemnumber'}));
@@ -59,7 +63,6 @@
 $template->param(norequests => $norequests);
 
   ## get notes and subjects from MARC record
-my $marc = C4::Context->preference("marc");
 
 #preformat isbn for amazon content
 my @results = ($dat,);
@@ -71,6 +74,8 @@
        $results[0]->{MARCNOTES} = $marcnotesarray;
        my $marcsubjctsarray = &getMARCsubjects($dbh,$bibid,$marcflavour);
        $results[0]->{MARCSUBJCTS} = $marcsubjctsarray;
+       my $marcaddauthorsarray = &getMARCaddlAuthors($dbh,$bibid,$marcflavour);
+       $results[0]->{ADDLAUTHORS} = $marcaddauthorsarray ;
 #      $template->param(MARCNOTES => $marcnotesarray);
 #      $template->param(MARCSUBJCTS => $marcsubjctsarray);
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]