Bug 30914: (24153 follow-up) Fix cleanup_database.pl --transfers --old-reserves

Silly mistake, 'delete if verbose' must be 'delete if confirm'

Test plan:
Try the cleanup_database.pl script to delete transfers and old issues.
Using --transfers --old-reserves and the --confirm flag the entries must be
removed

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a6166405c7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b503c186e4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
(cherry picked from commit 144372e72e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
This commit is contained in:
Jonathan Druart 2022-06-07 14:11:06 +02:00 committed by Victor Grousset/tuxayo
parent 1e24be03e6
commit a0413bf20f
1 changed files with 2 additions and 2 deletions

View File

@ -577,7 +577,7 @@ if ($pOldReserves) {
print "Purging old reserves older than $pOldReserves days.\n" if $verbose;
my $old_reserves = Koha::Old::Holds->filter_by_last_update( { days => $pOldReserves } );
my $count = $old_reserves->count;
$old_reserves->delete if $verbose;
$old_reserves->delete if $confirm;
if ($verbose) {
say $confirm
? sprintf "Done with purging %d old reserves.", $count
@ -594,7 +594,7 @@ if ($pTransfers) {
}
);
my $count = $transfers->count;
$transfers->delete if $verbose;
$transfers->delete if $confirm;
if ($verbose) {
say $confirm
? sprintf "Done with purging %d transfers.", $count