|
Lines 30-35
use MARC::Record;
Link Here
|
| 30 |
use C4::ClassSource; |
30 |
use C4::ClassSource; |
| 31 |
use C4::Log; |
31 |
use C4::Log; |
| 32 |
use List::MoreUtils qw/any/; |
32 |
use List::MoreUtils qw/any/; |
|
|
33 |
use C4::OAI::Sets qw/UpdateOAISetsBiblio/; |
| 33 |
use Data::Dumper; # used as part of logging item record changes, not just for |
34 |
use Data::Dumper; # used as part of logging item record changes, not just for |
| 34 |
# debugging; so please don't remove this |
35 |
# debugging; so please don't remove this |
| 35 |
|
36 |
|
|
Lines 269-275
sub AddItem {
Link Here
|
| 269 |
$item->{'itemnumber'} = $itemnumber; |
270 |
$item->{'itemnumber'} = $itemnumber; |
| 270 |
|
271 |
|
| 271 |
ModZebra( $item->{biblionumber}, "specialUpdate", "biblioserver", undef, undef ); |
272 |
ModZebra( $item->{biblionumber}, "specialUpdate", "biblioserver", undef, undef ); |
| 272 |
|
273 |
|
|
|
274 |
if(C4::Context->preference('OAI-PMH:AutoUpdateSets')) { |
| 275 |
my $record = GetMarcBiblio($biblionumber, 1); |
| 276 |
UpdateOAISetsBiblio($biblionumber, $record); |
| 277 |
} |
| 278 |
|
| 273 |
logaction("CATALOGUING", "ADD", $itemnumber, "item") if C4::Context->preference("CataloguingLog"); |
279 |
logaction("CATALOGUING", "ADD", $itemnumber, "item") if C4::Context->preference("CataloguingLog"); |
| 274 |
|
280 |
|
| 275 |
return ($item->{biblionumber}, $item->{biblioitemnumber}, $itemnumber); |
281 |
return ($item->{biblionumber}, $item->{biblioitemnumber}, $itemnumber); |
|
Lines 373-378
sub AddItemBatchFromMarc {
Link Here
|
| 373 |
$record->delete_field($item_field); |
379 |
$record->delete_field($item_field); |
| 374 |
} |
380 |
} |
| 375 |
|
381 |
|
|
|
382 |
if(C4::Context->preference('OAI-PMH:AutoUpdateSets')) { |
| 383 |
UpdateOAISetsBiblio($biblionumber, $record); |
| 384 |
} |
| 385 |
|
| 376 |
# update the MARC biblio |
386 |
# update the MARC biblio |
| 377 |
# $biblionumber = ModBiblioMarc( $record, $biblionumber, $frameworkcode ); |
387 |
# $biblionumber = ModBiblioMarc( $record, $biblionumber, $frameworkcode ); |
| 378 |
|
388 |
|
|
Lines 520-525
sub ModItem {
Link Here
|
| 520 |
# item status is possible |
530 |
# item status is possible |
| 521 |
ModZebra( $biblionumber, "specialUpdate", "biblioserver", undef, undef ); |
531 |
ModZebra( $biblionumber, "specialUpdate", "biblioserver", undef, undef ); |
| 522 |
|
532 |
|
|
|
533 |
if(C4::Context->preference('OAI-PMH:AutoUpdateSets')) { |
| 534 |
my $record = GetMarcBiblio($biblionumber, 1); |
| 535 |
UpdateOAISetsBiblio($biblionumber, $record); |
| 536 |
} |
| 537 |
|
| 523 |
logaction("CATALOGUING", "MODIFY", $itemnumber, Dumper($item)) if C4::Context->preference("CataloguingLog"); |
538 |
logaction("CATALOGUING", "MODIFY", $itemnumber, Dumper($item)) if C4::Context->preference("CataloguingLog"); |
| 524 |
} |
539 |
} |
| 525 |
|
540 |
|