|
Lines 1217-1230
sub GetMarcBiblio {
Link Here
|
| 1217 |
return; |
1217 |
return; |
| 1218 |
} |
1218 |
} |
| 1219 |
|
1219 |
|
| 1220 |
my $dbh = C4::Context->dbh; |
|
|
| 1221 |
my $sth = $dbh->prepare("SELECT biblioitemnumber FROM biblioitems WHERE biblionumber=? "); |
| 1222 |
$sth->execute($biblionumber); |
| 1223 |
my $row = $sth->fetchrow_hashref; |
| 1224 |
my $biblioitemnumber = $row->{'biblioitemnumber'}; |
| 1225 |
my $marcxml = GetXmlBiblio( $biblionumber ); |
1220 |
my $marcxml = GetXmlBiblio( $biblionumber ); |
| 1226 |
$marcxml = StripNonXmlChars( $marcxml ); |
1221 |
$marcxml = StripNonXmlChars( $marcxml ); |
| 1227 |
my $frameworkcode = GetFrameworkCode($biblionumber); |
|
|
| 1228 |
MARC::File::XML->default_record_format( C4::Context->preference('marcflavour') ); |
1222 |
MARC::File::XML->default_record_format( C4::Context->preference('marcflavour') ); |
| 1229 |
my $record = MARC::Record->new(); |
1223 |
my $record = MARC::Record->new(); |
| 1230 |
|
1224 |
|
|
Lines 1236-1243
sub GetMarcBiblio {
Link Here
|
| 1236 |
if ($@) { warn " problem with :$biblionumber : $@ \n$marcxml"; } |
1230 |
if ($@) { warn " problem with :$biblionumber : $@ \n$marcxml"; } |
| 1237 |
return unless $record; |
1231 |
return unless $record; |
| 1238 |
|
1232 |
|
| 1239 |
C4::Biblio::_koha_marc_update_bib_ids( $record, $frameworkcode, $biblionumber, |
|
|
| 1240 |
$biblioitemnumber ); |
| 1241 |
C4::Biblio::EmbedItemsInMarcBiblio({ |
1233 |
C4::Biblio::EmbedItemsInMarcBiblio({ |
| 1242 |
marc_record => $record, |
1234 |
marc_record => $record, |
| 1243 |
biblionumber => $biblionumber, |
1235 |
biblionumber => $biblionumber, |
| 1244 |
- |
|
|