Lines 226-232
sub AddBiblio {
Link Here
|
226 |
_koha_marc_update_biblioitem_cn_sort( $record, $olddata, $frameworkcode ); |
226 |
_koha_marc_update_biblioitem_cn_sort( $record, $olddata, $frameworkcode ); |
227 |
|
227 |
|
228 |
# now add the record |
228 |
# now add the record |
229 |
ModBiblioMarc( $record, $biblionumber, $frameworkcode ) unless $defer_marc_save; |
229 |
ModBiblioMarc( $record, $biblionumber ) unless $defer_marc_save; |
230 |
|
230 |
|
231 |
# update OAI-PMH sets |
231 |
# update OAI-PMH sets |
232 |
if(C4::Context->preference("OAI-PMH:AutoUpdateSets")) { |
232 |
if(C4::Context->preference("OAI-PMH:AutoUpdateSets")) { |
Lines 314-320
sub ModBiblio {
Link Here
|
314 |
_koha_marc_update_biblioitem_cn_sort( $record, $oldbiblio, $frameworkcode ); |
314 |
_koha_marc_update_biblioitem_cn_sort( $record, $oldbiblio, $frameworkcode ); |
315 |
|
315 |
|
316 |
# update the MARC record (that now contains biblio and items) with the new record data |
316 |
# update the MARC record (that now contains biblio and items) with the new record data |
317 |
&ModBiblioMarc( $record, $biblionumber, $frameworkcode ); |
317 |
&ModBiblioMarc( $record, $biblionumber ); |
318 |
|
318 |
|
319 |
# modify the other koha tables |
319 |
# modify the other koha tables |
320 |
_koha_modify_biblio( $dbh, $oldbiblio, $frameworkcode ); |
320 |
_koha_modify_biblio( $dbh, $oldbiblio, $frameworkcode ); |
Lines 3116-3122
sub _koha_delete_biblio_metadata {
Link Here
|
3116 |
|
3116 |
|
3117 |
=head2 ModBiblioMarc |
3117 |
=head2 ModBiblioMarc |
3118 |
|
3118 |
|
3119 |
&ModBiblioMarc($newrec,$biblionumber,$frameworkcode); |
3119 |
&ModBiblioMarc($newrec,$biblionumber); |
3120 |
|
3120 |
|
3121 |
Add MARC XML data for a biblio to koha |
3121 |
Add MARC XML data for a biblio to koha |
3122 |
|
3122 |
|
Lines 3127-3133
Function exported, but should NOT be used, unless you really know what you're do
Link Here
|
3127 |
sub ModBiblioMarc { |
3127 |
sub ModBiblioMarc { |
3128 |
# pass the MARC::Record to this function, and it will create the records in |
3128 |
# pass the MARC::Record to this function, and it will create the records in |
3129 |
# the marcxml field |
3129 |
# the marcxml field |
3130 |
my ( $record, $biblionumber, $frameworkcode ) = @_; |
3130 |
my ( $record, $biblionumber ) = @_; |
3131 |
if ( !$record ) { |
3131 |
if ( !$record ) { |
3132 |
carp 'ModBiblioMarc passed an undefined record'; |
3132 |
carp 'ModBiblioMarc passed an undefined record'; |
3133 |
return; |
3133 |
return; |
Lines 3137-3148
sub ModBiblioMarc {
Link Here
|
3137 |
$record = $record->clone(); |
3137 |
$record = $record->clone(); |
3138 |
my $dbh = C4::Context->dbh; |
3138 |
my $dbh = C4::Context->dbh; |
3139 |
my @fields = $record->fields(); |
3139 |
my @fields = $record->fields(); |
3140 |
if ( !$frameworkcode ) { |
|
|
3141 |
$frameworkcode = ""; |
3142 |
} |
3143 |
my $sth = $dbh->prepare("UPDATE biblio SET frameworkcode=? WHERE biblionumber=?"); |
3144 |
$sth->execute( $frameworkcode, $biblionumber ); |
3145 |
$sth->finish; |
3146 |
my $encoding = C4::Context->preference("marcflavour"); |
3140 |
my $encoding = C4::Context->preference("marcflavour"); |
3147 |
|
3141 |
|
3148 |
# deal with UNIMARC field 100 (encoding) : create it if needed & set encoding to unicode |
3142 |
# deal with UNIMARC field 100 (encoding) : create it if needed & set encoding to unicode |