forked from leftypol/leftypol
Add maintenance.php to the tools
This commit is contained in:
parent
d0b1c388eb
commit
03975a1bde
1 changed files with 13 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue