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