[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/acqui.simple marcimport.pl,1.6.2.11,1.6.2.12
From: |
Alan Millar |
Subject: |
[Koha-cvs] CVS: koha/acqui.simple marcimport.pl,1.6.2.11,1.6.2.12 |
Date: |
Wed, 05 Jun 2002 12:20:13 -0700 |
Update of /cvsroot/koha/koha/acqui.simple
In directory usw-pr-cvs1:/tmp/cvs-serv4344
Modified Files:
Tag: rel-1-2
marcimport.pl
Log Message:
Fix subject array handling
Index: marcimport.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/marcimport.pl,v
retrieving revision 1.6.2.11
retrieving revision 1.6.2.12
diff -C2 -r1.6.2.11 -r1.6.2.12
*** marcimport.pl 5 Jun 2002 17:19:04 -0000 1.6.2.11
--- marcimport.pl 5 Jun 2002 19:20:10 -0000 1.6.2.12
***************
*** 182,185 ****
--- 182,187 ----
)address@hidden;
+ my $debug=1;
+
my $sth;
print "<a href=$ENV{'SCRIPT_NAME'}>Main Menu</a><hr>\n";
***************
*** 311,315 ****
$illustrator =$bib->{illustrator};
$notes =$bib->{notes};
- $subject =$bib->{subject};
$titleinput=$input->textfield(-name=>'title', -default=>$title,
-size=>40);
--- 313,316 ----
***************
*** 319,328 ****
$illustratorinput=$input->textfield(-name=>'illustrator',
-default=>$illustrator);
$additionalauthorsinput=$input->textarea(-name=>'additionalauthors',
-default=>$additionalauthors, -rows=>4, -cols=>20);
my $subject='';
! foreach (@subjects) {
$subject.="$_\n";
}
! $subjectinput=$input->textarea(-name=>'subject',
-default=>$subject, -rows=>4, -cols=>40);
! $noteinput=$input->textarea(-name=>'notes', -default=>$notes,
-rows=>4, -cols=>40, -wrap=>'physical');
$copyrightinput=$input->textfield(-name=>'copyrightdate',
-default=>$copyrightdate);
$seriestitleinput=$input->textfield(-name=>'seriestitle',
-default=>$seriestitle);
--- 320,334 ----
$illustratorinput=$input->textfield(-name=>'illustrator',
-default=>$illustrator);
$additionalauthorsinput=$input->textarea(-name=>'additionalauthors',
-default=>$additionalauthors, -rows=>4, -cols=>20);
+
my $subject='';
! foreach ( @{$bib->{subject} } ) {
$subject.="$_\n";
+ print "<PRE>form subject=$subject</PRE>\n" if $debug;
}
! $subjectinput=$input->textarea(-name=>'subject',
! -default=>$subject, -rows=>4, -cols=>40);
!
! $noteinput=$input->textarea(-name=>'notes',
! -default=>$notes, -rows=>4, -cols=>40,
-wrap=>'physical');
$copyrightinput=$input->textfield(-name=>'copyrightdate',
-default=>$copyrightdate);
$seriestitleinput=$input->textfield(-name=>'seriestitle',
-default=>$seriestitle);
***************
*** 616,619 ****
--- 622,626 ----
my $bib; # hash of named fields
+ my $debug=0;
my (
***************
*** 626,629 ****
--- 633,639 ----
$s, $subdivision, $subjectsubfield,
$seriestitle);
+
+ print "<PRE>\n" if $debug;
+
foreach $field (@$record) {
if ($field->{'tag'} eq '001') {
***************
*** 724,727 ****
--- 734,738 ----
my $subject=$field->{'subfields'}->{'a'};
$subject=~s/\.$//;
+ print "Subject=$subject\n" if $debug;
foreach $subjectsubfield ( 'x','y','z' ) {
if
($subdivision=$field->{'subfields'}->{$subjectsubfield}) {
***************
*** 737,740 ****
--- 748,752 ----
} # if subfield exists
} # foreach subfield
+ print "Subject=$subject\n" if $debug;
push @subjects, $subject;
}
***************
*** 753,760 ****
($illustrator ) && ($bib->{illustrator}=$illustrator
);
($notes ) && ($bib->{notes}=$notes );
! ($subject ) && ($bib->{subject}=$subject );
} # foreach field
return $bib;
--- 765,773 ----
($illustrator ) && ($bib->{illustrator}=$illustrator
);
($notes ) && ($bib->{notes}=$notes );
! ($#subjects ) && ($bib->address@hidden );
} # foreach field
+ print "</PRE>\n" if $debug;
return $bib;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/acqui.simple marcimport.pl,1.6.2.11,1.6.2.12,
Alan Millar <=