From 61c35ebe50fbd7ee975d0c3be8dc705edf52eea2 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Sun, 14 Jul 2024 18:40:56 +0200 Subject: [PATCH] maintenance.php: log deleted entries count --- tools/maintenance.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/maintenance.php b/tools/maintenance.php index 0fc023a7..059c8ff7 100644 --- a/tools/maintenance.php +++ b/tools/maintenance.php @@ -5,21 +5,21 @@ require dirname(__FILE__) . '/inc/cli.php'; -$tot = 0; - echo "Clearing expired bans...\n"; $start = microtime(true); $deleted_count = Bans::purge($config['require_ban_view'], $config['purge_bans']); $delta = microtime(true) - $start; echo "Deleted $deleted_count expired bans in $delta seconds!\n"; -$tot += $delta; +$time_tot = $delta; +$deleted_tot = $deleted_count; echo "Clearing old antispam...\n"; $start = microtime(true); $deleted_count = purge_old_antispam(); $delta = microtime(true) - $start; echo "Deleted $deleted_count expired antispam in $delta seconds!\n"; -$tot += $delta; +$time_tot = $delta; +$deleted_tot = $deleted_count; $tot = number_format((float)$tot, 4, '.', ''); -modLog("Deleted expired entries in {$tot}s with maintenance tool"); +modLog("Deleted $deleted_tot expired entries in {$time_tot}s with maintenance tool");