mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-31 12:23:48 +01:00
Add maintenance.php to the tools
This commit is contained in:
parent
cbaf19cb7a
commit
accca93084
13
tools/maintenance.php
Normal file
13
tools/maintenance.php
Normal 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');
|
Loading…
x
Reference in New Issue
Block a user