MediaWiki REL1_33
rebuildmessages.php
Go to the documentation of this file.
1<?php
24require_once __DIR__ . '/Maintenance.php';
25
32 public function __construct() {
33 parent::__construct();
34 $this->addDescription( 'Purge all language messages from the cache' );
35 }
36
37 public function execute() {
39 if ( $wgLocalDatabases ) {
40 $databases = $wgLocalDatabases;
41 } else {
42 $databases = [ $wgDBname ];
43 }
44
45 foreach ( $databases as $db ) {
46 $this->output( "Deleting message cache for {$db}... " );
47 $messageMemc->delete( "{$db}:messages" );
49 $messageMemc->delete( "{$db}:sidebar" );
50 }
51 $this->output( "Deleted\n" );
52 }
53 }
54}
55
56$maintClass = RebuildMessages::class;
57require_once RUN_MAINTENANCE_IF_MAIN;
$wgEnableSidebarCache
If on, the sidebar navigation links are cached for users with the current language set.
string[] $wgLocalDatabases
Other wikis on this site, can be administered from a single developer account.
$messageMemc
Definition Setup.php:769
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.
Maintenance script that purges all languages from the message cache.
execute()
Do the actual work.
__construct()
Default constructor.
require_once RUN_MAINTENANCE_IF_MAIN
controlled by the following MediaWiki still creates a BagOStuff but calls it to it are no ops If the cache daemon can t be it should also disable itself fairly $wgDBname
$maintClass