Lines 285-291
sub AddBiblio {
Link Here
|
285 |
_koha_marc_update_biblioitem_cn_sort( $record, $olddata, $frameworkcode ); |
285 |
_koha_marc_update_biblioitem_cn_sort( $record, $olddata, $frameworkcode ); |
286 |
|
286 |
|
287 |
# now add the record |
287 |
# now add the record |
288 |
ModBiblioMarc( $record, $biblionumber, $frameworkcode ) unless $defer_marc_save; |
288 |
ModBiblioMarc( $record, $biblionumber ) unless $defer_marc_save; |
289 |
|
289 |
|
290 |
# update OAI-PMH sets |
290 |
# update OAI-PMH sets |
291 |
if(C4::Context->preference("OAI-PMH:AutoUpdateSets")) { |
291 |
if(C4::Context->preference("OAI-PMH:AutoUpdateSets")) { |
Lines 378-384
sub ModBiblio {
Link Here
|
378 |
_koha_marc_update_biblioitem_cn_sort( $record, $oldbiblio, $frameworkcode ); |
378 |
_koha_marc_update_biblioitem_cn_sort( $record, $oldbiblio, $frameworkcode ); |
379 |
|
379 |
|
380 |
# update the MARC record (that now contains biblio and items) with the new record data |
380 |
# update the MARC record (that now contains biblio and items) with the new record data |
381 |
&ModBiblioMarc( $record, $biblionumber, $frameworkcode ); |
381 |
&ModBiblioMarc( $record, $biblionumber ); |
382 |
|
382 |
|
383 |
# modify the other koha tables |
383 |
# modify the other koha tables |
384 |
_koha_modify_biblio( $dbh, $oldbiblio, $frameworkcode ); |
384 |
_koha_modify_biblio( $dbh, $oldbiblio, $frameworkcode ); |
Lines 2982-2988
sub _koha_delete_biblio_metadata {
Link Here
|
2982 |
|
2982 |
|
2983 |
=head2 ModBiblioMarc |
2983 |
=head2 ModBiblioMarc |
2984 |
|
2984 |
|
2985 |
&ModBiblioMarc($newrec,$biblionumber,$frameworkcode); |
2985 |
&ModBiblioMarc($newrec,$biblionumber); |
2986 |
|
2986 |
|
2987 |
Add MARC XML data for a biblio to koha |
2987 |
Add MARC XML data for a biblio to koha |
2988 |
|
2988 |
|
Lines 2993-2999
Function exported, but should NOT be used, unless you really know what you're do
Link Here
|
2993 |
sub ModBiblioMarc { |
2993 |
sub ModBiblioMarc { |
2994 |
# pass the MARC::Record to this function, and it will create the records in |
2994 |
# pass the MARC::Record to this function, and it will create the records in |
2995 |
# the marcxml field |
2995 |
# the marcxml field |
2996 |
my ( $record, $biblionumber, $frameworkcode ) = @_; |
2996 |
my ( $record, $biblionumber ) = @_; |
2997 |
if ( !$record ) { |
2997 |
if ( !$record ) { |
2998 |
carp 'ModBiblioMarc passed an undefined record'; |
2998 |
carp 'ModBiblioMarc passed an undefined record'; |
2999 |
return; |
2999 |
return; |
Lines 3003-3014
sub ModBiblioMarc {
Link Here
|
3003 |
$record = $record->clone(); |
3003 |
$record = $record->clone(); |
3004 |
my $dbh = C4::Context->dbh; |
3004 |
my $dbh = C4::Context->dbh; |
3005 |
my @fields = $record->fields(); |
3005 |
my @fields = $record->fields(); |
3006 |
if ( !$frameworkcode ) { |
|
|
3007 |
$frameworkcode = ""; |
3008 |
} |
3009 |
my $sth = $dbh->prepare("UPDATE biblio SET frameworkcode=? WHERE biblionumber=?"); |
3010 |
$sth->execute( $frameworkcode, $biblionumber ); |
3011 |
$sth->finish; |
3012 |
my $encoding = C4::Context->preference("marcflavour"); |
3006 |
my $encoding = C4::Context->preference("marcflavour"); |
3013 |
|
3007 |
|
3014 |
# deal with UNIMARC field 100 (encoding) : create it if needed & set encoding to unicode |
3008 |
# deal with UNIMARC field 100 (encoding) : create it if needed & set encoding to unicode |