&NEWnewbiblio &NEWnewitem
&NEWmodbiblio &NEWmoditem
&NEWdelbiblio &NEWdelitem
+ &NEWmodbiblioframework
&MARCaddbiblio &MARCadditem
&MARCmodsubfield &MARCaddsubfield
&MARCkoha2marcOnefield( $sth, $record, "additionalauthors.author",
$row->{'author'},'' );
}
- my $sth2 =
+ $sth2 =
$dbh->prepare(" SELECT subject FROM bibliosubject WHERE biblionumber=?");
$sth2->execute($biblionumber);
while ( my $row = $sth2->fetchrow_hashref ) {
&MARCkoha2marcOnefield( $sth, $record, "bibliosubject.subject",
$row->{'subject'},'' );
}
- my $sth2 =
+ $sth2 =
$dbh->prepare(
" SELECT subtitle FROM bibliosubtitle WHERE biblionumber=?");
$sth2->execute($biblionumber);
$indicators{@$rtags[$i]}.=' ';
if (@$rtags[$i] <10) {
$prevvalue= @$rvalues[$i];
+ undef $field;
} else {
+ undef $prevvalue;
$field = MARC::Field->new( (sprintf "%03s",@$rtags[$i]), substr($indicators{@$rtags[$i]},0,1),substr($indicators{@$rtags[$i]},1,1), @$rsubfields[$i] => @$rvalues[$i]);
# warn "1=>".@$rtags[$i].@$rsubfields[$i]." = ".@$rvalues[$i].": ".$field->as_formatted;
}
}
}
# the last has not been included inside the loop... do it now !
- $record->add_fields($field);
+ $record->add_fields($field) if $field;
# warn "HTML2MARC=".$record->as_formatted;
return $record;
}
$result->{'copyrightdate'} = $1;
}
# modify publicationyear to keep only the 1st year found
- my $temp = $result->{'publicationyear'};
+ $temp = $result->{'publicationyear'};
$temp =~ m/c(\d\d\d\d)/; # search cYYYY first
if ($1>0) {
$result->{'publicationyear'} = $1;
return ( $bibid, $oldbibnum, $oldbibitemnum );
}
+sub NEWmodbiblioframework {
+ my ($dbh,$bibid,$frameworkcode) =@_;
+ my $sth = $dbh->prepare("Update marc_biblio SET frameworkcode=? WHERE bibid=$bibid");
+ $sth->execute($frameworkcode);
+ return 1;
+}
sub NEWmodbiblio {
my ($dbh,$record,$bibid,$frameworkcode) =@_;
$frameworkcode="" unless $frameworkcode;
my ( $itemnumber, $error ) = &OLDnewitems( $dbh, $item, $item->{barcode} );
# add itemnumber to MARC::Record before adding the item.
- my $sth =
+ $sth =
$dbh->prepare(
"select tagfield,tagsubfield from marc_subfield_structure where frameworkcode=? and kohafield=?"
);
$sth->finish;
$sth =
$dbh->prepare(
-"insert into biblio set biblionumber = ?, title = ?, author = ?, copyrightdate = ?, serial = ?, seriestitle = ?, notes = ?, abstract = ?"
+"insert into biblio set biblionumber = ?, title = ?, author = ?, copyrightdate = ?, serial = ?, seriestitle = ?, notes = ?, abstract = ?, unititle = ?"
);
$sth->execute(
$bibnum, $biblio->{'title'},
$biblio->{'author'}, $biblio->{'copyrightdate'},
$biblio->{'serial'}, $biblio->{'seriestitle'},
- $biblio->{'notes'}, $biblio->{'abstract'}
+ $biblio->{'notes'}, $biblio->{'abstract'},
+ $biblio->{'unititle'},
);
$sth->finish;
# $Id$
# $Log$
+# Revision 1.121 2005/06/20 14:10:00 tipaul
+# synch'ing 2.2 and head
+#
# Revision 1.120 2005/06/15 16:09:43 hdl
# Displaying dashed isbn.
#