MediaWiki  master
rebuildmessages.php
Go to the documentation of this file.
1 <?php
23 
24 require_once __DIR__ . '/Maintenance.php';
25 
32  public function __construct() {
33  parent::__construct();
34  $this->addDescription( 'Purge the MessageCache for all interface languages.' );
35  }
36 
37  public function execute() {
38  $this->output( "Purging message cache for all languages on this wiki... " );
39  $messageCache = MediaWikiServices::getInstance()->getMessageCache();
40  $messageCache->clear();
41  $this->output( "Done\n" );
42  }
43 }
44 
45 $maintClass = RebuildMessages::class;
46 require_once RUN_MAINTENANCE_IF_MAIN;
Maintenance script that purges cache used by MessageCache.
const RUN_MAINTENANCE_IF_MAIN
Definition: Maintenance.php:39
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
Definition: Maintenance.php:86
addDescription( $text)
Set the description text.
$maintClass
output( $out, $channel=null)
Throw some output to the user.