View | Details | Raw Unified | Return to bug 7146
Collapse All | Expand All

(-)a/C4/Biblio.pm (-6 / +12 lines)
Lines 3522-3530 sub _koha_delete_biblio { Link Here
3522
        $bkup_sth->finish;
3522
        $bkup_sth->finish;
3523
3523
3524
        # delete the biblio
3524
        # delete the biblio
3525
        my $del_sth = $dbh->prepare("DELETE FROM biblio WHERE biblionumber=?");
3525
        my $sth2 = $dbh->prepare("DELETE FROM biblio WHERE biblionumber=?");
3526
        $del_sth->execute($biblionumber);
3526
        $sth2->execute($biblionumber);
3527
        $del_sth->finish;
3527
        # update the timestamp (Bugzilla 7146)
3528
        $sth2= $dbh->prepare("UPDATE deletedbiblio SET timestamp=NOW() WHERE biblionumber=?");
3529
        $sth2->execute($biblionumber);
3530
        $sth2->finish;
3528
    }
3531
    }
3529
    $sth->finish;
3532
    $sth->finish;
3530
    return undef;
3533
    return undef;
Lines 3568-3576 sub _koha_delete_biblioitems { Link Here
3568
        $bkup_sth->finish;
3571
        $bkup_sth->finish;
3569
3572
3570
        # delete the biblioitem
3573
        # delete the biblioitem
3571
        my $del_sth = $dbh->prepare("DELETE FROM biblioitems WHERE biblioitemnumber=?");
3574
        my $sth2 = $dbh->prepare("DELETE FROM biblioitems WHERE biblioitemnumber=?");
3572
        $del_sth->execute($biblioitemnumber);
3575
        $sth2->execute($biblioitemnumber);
3573
        $del_sth->finish;
3576
        # update the timestamp (Bugzilla 7146)
3577
        $sth2= $dbh->prepare("UPDATE deletedbiblioitems SET timestamp=NOW() WHERE biblioitemnumber=?");
3578
        $sth2->execute($biblioitemnumber);
3579
        $sth2->finish;
3574
    }
3580
    }
3575
    $sth->finish;
3581
    $sth->finish;
3576
    return undef;
3582
    return undef;
(-)a/C4/Items.pm (-1 / +1 lines)
Lines 587-592 sub DelItem { Link Here
587
    # backup the record
587
    # backup the record
588
    my $copy2deleted = $dbh->prepare("UPDATE deleteditems SET marc=? WHERE itemnumber=?");
588
    my $copy2deleted = $dbh->prepare("UPDATE deleteditems SET marc=? WHERE itemnumber=?");
589
    $copy2deleted->execute( $record->as_usmarc(), $itemnumber );
589
    $copy2deleted->execute( $record->as_usmarc(), $itemnumber );
590
    # This last update statement makes that the timestamp column in deleteditems is updated too. If you remove these lines, please add a line to update the timestamp separately. See Bugzilla report 7146 and Biblio.pm (DelBiblio).
590
591
591
    #search item field code
592
    #search item field code
592
    logaction("CATALOGUING", "DELETE", $itemnumber, "item") if C4::Context->preference("CataloguingLog");
593
    logaction("CATALOGUING", "DELETE", $itemnumber, "item") if C4::Context->preference("CataloguingLog");
593
- 

Return to bug 7146