1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-01-19 01:24:05 +01:00

Add maintenance.php to the tools

This commit is contained in:
Zankaria 2024-06-30 17:02:21 +02:00 committed by Zankaria
parent cbaf19cb7a
commit accca93084

13
tools/maintenance.php Normal file
View File

@ -0,0 +1,13 @@
<?php
/**
* Performs maintenance tasks. Invoke this periodically if the auto_maintenance configuration option is turned off.
*/
require dirname(__FILE__) . '/inc/cli.php';
echo "Clearing expired bans...";
$start = microtime(true);
$deleted_count = Bans::purge($config['require_ban_view']);
$delta = microtime(true) - $start;
echo "Deleted $deleted_count expired bans in $delta seconds!";
modLog('Deleted expired bans using tools/maintenance.php');