Lines 414-420
sub DelBiblio {
Link Here
|
414 |
# and we would have no way to remove it (except manually in zebra, but I bet it would be very hard to handle the problem) |
414 |
# and we would have no way to remove it (except manually in zebra, but I bet it would be very hard to handle the problem) |
415 |
ModZebra( $biblionumber, "recordDelete", "biblioserver" ); |
415 |
ModZebra( $biblionumber, "recordDelete", "biblioserver" ); |
416 |
|
416 |
|
417 |
# delete biblioitems and items from Koha tables and save in deletedbiblioitems,deleteditems |
417 |
# mark biblioitems and items as deleted |
418 |
$sth = $dbh->prepare("SELECT biblioitemnumber FROM biblioitems WHERE biblionumber=? AND deleted_at IS NULL"); |
418 |
$sth = $dbh->prepare("SELECT biblioitemnumber FROM biblioitems WHERE biblionumber=? AND deleted_at IS NULL"); |
419 |
$sth->execute($biblionumber); |
419 |
$sth->execute($biblionumber); |
420 |
while ( my $biblioitemnumber = $sth->fetchrow ) { |
420 |
while ( my $biblioitemnumber = $sth->fetchrow ) { |
Lines 424-434
sub DelBiblio {
Link Here
|
424 |
return $error if $error; |
424 |
return $error if $error; |
425 |
} |
425 |
} |
426 |
|
426 |
|
427 |
|
|
|
428 |
# delete biblio from Koha tables and save in deletedbiblio |
429 |
# must do this *after* _koha_delete_biblioitems, otherwise |
430 |
# delete cascade will prevent deletedbiblioitems rows |
431 |
# from being generated by _koha_delete_biblioitems |
432 |
$error = _koha_delete_biblio( $dbh, $biblionumber ); |
427 |
$error = _koha_delete_biblio( $dbh, $biblionumber ); |
433 |
|
428 |
|
434 |
logaction( "CATALOGUING", "DELETE", $biblionumber, "biblio" ) if C4::Context->preference("CataloguingLog"); |
429 |
logaction( "CATALOGUING", "DELETE", $biblionumber, "biblio" ) if C4::Context->preference("CataloguingLog"); |
Lines 3114-3124
sub _koha_add_biblioitem {
Link Here
|
3114 |
|
3109 |
|
3115 |
$error = _koha_delete_biblio($dbh,$biblionumber); |
3110 |
$error = _koha_delete_biblio($dbh,$biblionumber); |
3116 |
|
3111 |
|
3117 |
Internal sub for deleting from biblio table -- also saves to deletedbiblio |
3112 |
Internal sub for deleting from biblio table |
3118 |
|
3113 |
|
3119 |
C<$dbh> - the database handle |
3114 |
C<$dbh> - the database handle |
3120 |
|
3115 |
|
3121 |
C<$biblionumber> - the biblionumber of the biblio to be deleted |
3116 |
C<$biblionumber> - the biblionumber of the biblio (and metadata) to be marked as deleted |
3122 |
|
3117 |
|
3123 |
=cut |
3118 |
=cut |
3124 |
|
3119 |
|
Lines 3135-3144
sub _koha_delete_biblio {
Link Here
|
3135 |
|
3130 |
|
3136 |
$error = _koha_delete_biblioitems($dbh,$biblioitemnumber); |
3131 |
$error = _koha_delete_biblioitems($dbh,$biblioitemnumber); |
3137 |
|
3132 |
|
3138 |
Internal sub for deleting from biblioitems table -- also saves to deletedbiblioitems |
3133 |
Internal sub for deleting from biblioitems table |
3139 |
|
3134 |
|
3140 |
C<$dbh> - the database handle |
3135 |
C<$dbh> - the database handle |
3141 |
C<$biblionumber> - the biblioitemnumber of the biblioitem to be deleted |
3136 |
C<$biblionumber> - the biblioitemnumber of the biblioitem to be marked as deleted |
3142 |
|
3137 |
|
3143 |
=cut |
3138 |
=cut |
3144 |
|
3139 |
|
Lines 3154-3160
sub _koha_delete_biblioitems {
Link Here
|
3154 |
|
3149 |
|
3155 |
$error = _koha_delete_biblio_metadata($biblionumber); |
3150 |
$error = _koha_delete_biblio_metadata($biblionumber); |
3156 |
|
3151 |
|
3157 |
C<$biblionumber> - the biblionumber of the biblio metadata to be deleted |
3152 |
C<$biblionumber> - the biblionumber of the biblio metadata to be marked as deleted |
3158 |
|
3153 |
|
3159 |
=cut |
3154 |
=cut |
3160 |
|
3155 |
|
3161 |
- |
|
|