From a6166405c7d7886466a8d1264c98970b4973f77f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 7 Jun 2022 14:11:06 +0200 Subject: [PATCH] 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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- misc/cronjobs/cleanup_database.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl index 56b7a7d7c4..74505cf067 100755 --- a/misc/cronjobs/cleanup_database.pl +++ b/misc/cronjobs/cleanup_database.pl @@ -609,7 +609,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 @@ -626,7 +626,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 -- 2.39.5