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 3078-3088
sub _koha_add_biblioitem {
Link Here
|
3078 |
|
3073 |
|
3079 |
$error = _koha_delete_biblio($dbh,$biblionumber); |
3074 |
$error = _koha_delete_biblio($dbh,$biblionumber); |
3080 |
|
3075 |
|
3081 |
Internal sub for deleting from biblio table -- also saves to deletedbiblio |
3076 |
Internal sub for deleting from biblio table |
3082 |
|
3077 |
|
3083 |
C<$dbh> - the database handle |
3078 |
C<$dbh> - the database handle |
3084 |
|
3079 |
|
3085 |
C<$biblionumber> - the biblionumber of the biblio to be deleted |
3080 |
C<$biblionumber> - the biblionumber of the biblio (and metadata) to be marked as deleted |
3086 |
|
3081 |
|
3087 |
=cut |
3082 |
=cut |
3088 |
|
3083 |
|
Lines 3099-3108
sub _koha_delete_biblio {
Link Here
|
3099 |
|
3094 |
|
3100 |
$error = _koha_delete_biblioitems($dbh,$biblioitemnumber); |
3095 |
$error = _koha_delete_biblioitems($dbh,$biblioitemnumber); |
3101 |
|
3096 |
|
3102 |
Internal sub for deleting from biblioitems table -- also saves to deletedbiblioitems |
3097 |
Internal sub for deleting from biblioitems table |
3103 |
|
3098 |
|
3104 |
C<$dbh> - the database handle |
3099 |
C<$dbh> - the database handle |
3105 |
C<$biblionumber> - the biblioitemnumber of the biblioitem to be deleted |
3100 |
C<$biblionumber> - the biblioitemnumber of the biblioitem to be marked as deleted |
3106 |
|
3101 |
|
3107 |
=cut |
3102 |
=cut |
3108 |
|
3103 |
|
Lines 3118-3124
sub _koha_delete_biblioitems {
Link Here
|
3118 |
|
3113 |
|
3119 |
$error = _koha_delete_biblio_metadata($biblionumber); |
3114 |
$error = _koha_delete_biblio_metadata($biblionumber); |
3120 |
|
3115 |
|
3121 |
C<$biblionumber> - the biblionumber of the biblio metadata to be deleted |
3116 |
C<$biblionumber> - the biblionumber of the biblio metadata to be marked as deleted |
3122 |
|
3117 |
|
3123 |
=cut |
3118 |
=cut |
3124 |
|
3119 |
|
3125 |
- |
|
|