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 3071-3081
sub _koha_add_biblioitem {
Link Here
|
3071 |
|
3066 |
|
3072 |
$error = _koha_delete_biblio($dbh,$biblionumber); |
3067 |
$error = _koha_delete_biblio($dbh,$biblionumber); |
3073 |
|
3068 |
|
3074 |
Internal sub for deleting from biblio table -- also saves to deletedbiblio |
3069 |
Internal sub for deleting from biblio table |
3075 |
|
3070 |
|
3076 |
C<$dbh> - the database handle |
3071 |
C<$dbh> - the database handle |
3077 |
|
3072 |
|
3078 |
C<$biblionumber> - the biblionumber of the biblio to be deleted |
3073 |
C<$biblionumber> - the biblionumber of the biblio (and metadata) to be marked as deleted |
3079 |
|
3074 |
|
3080 |
=cut |
3075 |
=cut |
3081 |
|
3076 |
|
Lines 3092-3101
sub _koha_delete_biblio {
Link Here
|
3092 |
|
3087 |
|
3093 |
$error = _koha_delete_biblioitems($dbh,$biblioitemnumber); |
3088 |
$error = _koha_delete_biblioitems($dbh,$biblioitemnumber); |
3094 |
|
3089 |
|
3095 |
Internal sub for deleting from biblioitems table -- also saves to deletedbiblioitems |
3090 |
Internal sub for deleting from biblioitems table |
3096 |
|
3091 |
|
3097 |
C<$dbh> - the database handle |
3092 |
C<$dbh> - the database handle |
3098 |
C<$biblionumber> - the biblioitemnumber of the biblioitem to be deleted |
3093 |
C<$biblionumber> - the biblioitemnumber of the biblioitem to be marked as deleted |
3099 |
|
3094 |
|
3100 |
=cut |
3095 |
=cut |
3101 |
|
3096 |
|
Lines 3111-3117
sub _koha_delete_biblioitems {
Link Here
|
3111 |
|
3106 |
|
3112 |
$error = _koha_delete_biblio_metadata($biblionumber); |
3107 |
$error = _koha_delete_biblio_metadata($biblionumber); |
3113 |
|
3108 |
|
3114 |
C<$biblionumber> - the biblionumber of the biblio metadata to be deleted |
3109 |
C<$biblionumber> - the biblionumber of the biblio metadata to be marked as deleted |
3115 |
|
3110 |
|
3116 |
=cut |
3111 |
=cut |
3117 |
|
3112 |
|
3118 |
- |
|
|