bans.php: refactor to expose the moratorium on ban deletion from the database.

Also fixes the 'purge_bans' configuration for non-cache deployments.
This commit is contained in:
Zankaria 2024-07-11 22:48:19 +02:00
parent 4b03672f77
commit d69eebb1d3
4 changed files with 8 additions and 8 deletions

View file

@ -7,7 +7,7 @@ require dirname(__FILE__) . '/inc/cli.php';
echo "Clearing expired bans...";
$start = microtime(true);
$deleted_count = Bans::purge($config['require_ban_view']);
$deleted_count = Bans::purge($config['require_ban_view'], $config['purge_bans']);
$delta = microtime(true) - $start;
echo "Deleted $deleted_count expired bans in $delta seconds!";
modLog("Deleted expired bans in {$delta}s with tools/maintenance.php");