Lines 2489-2508
sub CountItemsIssued {
Link Here
|
2489 |
|
2489 |
|
2490 |
=head2 ModZebra |
2490 |
=head2 ModZebra |
2491 |
|
2491 |
|
2492 |
ModZebra( $biblionumber, $op, $server, $record ); |
2492 |
ModZebra( $record_number, $op, $server, $record ); |
2493 |
|
2493 |
|
2494 |
$biblionumber is the biblionumber we want to index |
2494 |
$record_number is the authid or biblionumber we want to index |
2495 |
|
2495 |
|
2496 |
$op is specialUpdate or recordDelete, and is used to know what we want to do |
2496 |
$op is the operation: specialUpdate or recordDelete |
2497 |
|
2497 |
|
2498 |
$server is the server that we want to update |
2498 |
$server is authorityserver or biblioserver |
2499 |
|
2499 |
|
2500 |
=cut |
2500 |
=cut |
2501 |
|
2501 |
|
2502 |
sub ModZebra { |
2502 |
sub ModZebra { |
2503 |
###Accepts a $server variable thus we can use it for biblios authorities or other zebra dbs |
2503 |
my ( $record_number, $op, $server ) = @_; |
2504 |
my ( $biblionumber, $op, $server ) = @_; |
2504 |
$debug && warn "ModZebra: updates requested for: $record_number $op $server\n"; |
2505 |
$debug && warn "ModZebra: updates requested for: $biblionumber $op $server\n"; |
|
|
2506 |
my $dbh = C4::Context->dbh; |
2505 |
my $dbh = C4::Context->dbh; |
2507 |
|
2506 |
|
2508 |
# true ModZebra commented until indexdata fixes zebraDB crashes (it seems they occur on multiple updates |
2507 |
# true ModZebra commented until indexdata fixes zebraDB crashes (it seems they occur on multiple updates |
Lines 2515-2531
sub ModZebra {
Link Here
|
2515 |
AND operation = ? |
2514 |
AND operation = ? |
2516 |
AND done = 0"; |
2515 |
AND done = 0"; |
2517 |
my $check_sth = $dbh->prepare_cached($check_sql); |
2516 |
my $check_sth = $dbh->prepare_cached($check_sql); |
2518 |
$check_sth->execute( $server, $biblionumber, $op ); |
2517 |
$check_sth->execute( $server, $record_number, $op ); |
2519 |
my ($count) = $check_sth->fetchrow_array; |
2518 |
my ($count) = $check_sth->fetchrow_array; |
2520 |
$check_sth->finish(); |
2519 |
$check_sth->finish(); |
2521 |
if ( $count == 0 ) { |
2520 |
if ( $count == 0 ) { |
2522 |
my $sth = $dbh->prepare("INSERT INTO zebraqueue (biblio_auth_number,server,operation) VALUES(?,?,?)"); |
2521 |
my $sth = $dbh->prepare("INSERT INTO zebraqueue (biblio_auth_number,server,operation) VALUES(?,?,?)"); |
2523 |
$sth->execute( $biblionumber, $server, $op ); |
2522 |
$sth->execute( $record_number, $server, $op ); |
2524 |
$sth->finish; |
2523 |
$sth->finish; |
2525 |
} |
2524 |
} |
2526 |
} |
2525 |
} |
2527 |
|
2526 |
|
2528 |
|
|
|
2529 |
=head2 EmbedItemsInMarcBiblio |
2527 |
=head2 EmbedItemsInMarcBiblio |
2530 |
|
2528 |
|
2531 |
EmbedItemsInMarcBiblio({ |
2529 |
EmbedItemsInMarcBiblio({ |