MediaWiki REL1_39
purgeExpiredBlocks.php
Go to the documentation of this file.
1<?php
23
24require_once __DIR__ . '/Maintenance.php';
25
26/*
27 * Maintenance script to remove expired blocks
28 *
29 * @since 1.35
30 * @author DannyS712
31 */
32
34 public function __construct() {
35 parent::__construct();
36 $this->addDescription( 'Remove expired blocks.' );
37 }
38
39 public function execute() {
40 $this->output( "Purging expired blocks...\n" );
41
42 MediaWikiServices::getInstance()->getDatabaseBlockStore()->purgeExpiredBlocks();
43
44 $this->output( "Done purging expired blocks.\n" );
45 }
46}
47
48$maintClass = PurgeExpiredBlocks::class;
49require_once RUN_MAINTENANCE_IF_MAIN;
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
output( $out, $channel=null)
Throw some output to the user.
addDescription( $text)
Set the description text.
Service locator for MediaWiki core services.
execute()
Do the actual work.
__construct()
Default constructor.