Lines 257-263
sub AddBiblio {
Link Here
|
257 |
|
257 |
|
258 |
# transform the data into koha-table style data |
258 |
# transform the data into koha-table style data |
259 |
SetUTF8Flag($record); |
259 |
SetUTF8Flag($record); |
260 |
my $olddata = TransformMarcToKoha( $dbh, $record, $frameworkcode ); |
260 |
my $olddata = TransformMarcToKoha( $record, $frameworkcode ); |
261 |
( $biblionumber, $error ) = _koha_add_biblio( $dbh, $olddata, $frameworkcode ); |
261 |
( $biblionumber, $error ) = _koha_add_biblio( $dbh, $olddata, $frameworkcode ); |
262 |
$olddata->{'biblionumber'} = $biblionumber; |
262 |
$olddata->{'biblionumber'} = $biblionumber; |
263 |
( $biblioitemnumber, $error ) = _koha_add_biblioitem( $dbh, $olddata ); |
263 |
( $biblioitemnumber, $error ) = _koha_add_biblioitem( $dbh, $olddata ); |
Lines 340-346
sub ModBiblio {
Link Here
|
340 |
_koha_marc_update_bib_ids( $record, $frameworkcode, $biblionumber, $biblioitemnumber ); |
340 |
_koha_marc_update_bib_ids( $record, $frameworkcode, $biblionumber, $biblioitemnumber ); |
341 |
|
341 |
|
342 |
# load the koha-table data object |
342 |
# load the koha-table data object |
343 |
my $oldbiblio = TransformMarcToKoha( $dbh, $record, $frameworkcode ); |
343 |
my $oldbiblio = TransformMarcToKoha( $record, $frameworkcode ); |
344 |
|
344 |
|
345 |
# update MARC subfield that stores biblioitems.cn_sort |
345 |
# update MARC subfield that stores biblioitems.cn_sort |
346 |
_koha_marc_update_biblioitem_cn_sort( $record, $oldbiblio, $frameworkcode ); |
346 |
_koha_marc_update_biblioitem_cn_sort( $record, $oldbiblio, $frameworkcode ); |
Lines 2606-2612
our $inverted_field_map;
Link Here
|
2606 |
|
2606 |
|
2607 |
=head2 TransformMarcToKoha |
2607 |
=head2 TransformMarcToKoha |
2608 |
|
2608 |
|
2609 |
$result = TransformMarcToKoha( $dbh, $record, $frameworkcode ) |
2609 |
$result = TransformMarcToKoha( $record, $frameworkcode ) |
2610 |
|
2610 |
|
2611 |
Extract data from a MARC bib record into a hashref representing |
2611 |
Extract data from a MARC bib record into a hashref representing |
2612 |
Koha biblio, biblioitems, and items fields. |
2612 |
Koha biblio, biblioitems, and items fields. |
Lines 2617-2624
hash_ref
Link Here
|
2617 |
=cut |
2617 |
=cut |
2618 |
|
2618 |
|
2619 |
sub TransformMarcToKoha { |
2619 |
sub TransformMarcToKoha { |
2620 |
my ( $dbh, $record, $frameworkcode, $limit_table ) = @_; |
2620 |
my ( $record, $frameworkcode, $limit_table ) = @_; |
2621 |
## FIXME: $dbh parameter is never used inside this subroutine ??? |
|
|
2622 |
|
2621 |
|
2623 |
my $result = {}; |
2622 |
my $result = {}; |
2624 |
if (!defined $record) { |
2623 |
if (!defined $record) { |