MediaWiki REL1_39
rebuildmessages.php
Go to the documentation of this file.
1<?php
23
24require_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;
46require_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.
Maintenance script that purges cache used by MessageCache.
execute()
Do the actual work.
__construct()
Default constructor.
$maintClass