MediaWiki  1.23.2
rebuildall.php
Go to the documentation of this file.
1 <?php
25 require_once __DIR__ . '/Maintenance.php';
26 
32 class RebuildAll extends Maintenance {
33  public function __construct() {
34  parent::__construct();
35  $this->mDescription = "Rebuild links, text index and recent changes";
36  }
37 
38  public function getDbType() {
39  return Maintenance::DB_ADMIN;
40  }
41 
42  public function execute() {
43  // Rebuild the text index
44  if ( wfGetDB( DB_SLAVE )->getType() != 'postgres' ) {
45  $this->output( "** Rebuilding fulltext search index (if you abort this will break searching; run this script again to fix):\n" );
46  $rebuildText = $this->runChild( 'RebuildTextIndex', 'rebuildtextindex.php' );
47  $rebuildText->execute();
48  }
49 
50  // Rebuild RC
51  $this->output( "\n\n** Rebuilding recentchanges table:\n" );
52  $rebuildRC = $this->runChild( 'RebuildRecentchanges', 'rebuildrecentchanges.php' );
53  $rebuildRC->execute();
54 
55  // Rebuild link tables
56  $this->output( "\n\n** Rebuilding links tables -- this can take a long time. It should be safe to abort via ctrl+C if you get bored.\n" );
57  $rebuildLinks = $this->runChild( 'RefreshLinks', 'refreshLinks.php' );
58  $rebuildLinks->execute();
59 
60  $this->output( "Done.\n" );
61  }
62 }
63 
64 $maintClass = "RebuildAll";
65 require_once RUN_MAINTENANCE_IF_MAIN;
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
RebuildAll
Maintenance script that rebuilds link tracking tables from scratch.
Definition: rebuildall.php:32
RebuildAll\execute
execute()
Do the actual work.
Definition: rebuildall.php:42
wfGetDB
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:3650
Maintenance\runChild
runChild( $maintClass, $classFile=null)
Run a child maintenance script.
Definition: Maintenance.php:444
RUN_MAINTENANCE_IF_MAIN
require_once RUN_MAINTENANCE_IF_MAIN
Definition: maintenance.txt:50
Maintenance
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
Definition: maintenance.txt:39
$maintClass
$maintClass
Definition: rebuildall.php:64
RebuildAll\__construct
__construct()
Default constructor.
Definition: rebuildall.php:33
Maintenance\DB_ADMIN
const DB_ADMIN
Definition: Maintenance.php:59
RebuildAll\getDbType
getDbType()
Does the script need different DB access? By default, we give Maintenance scripts normal rights to th...
Definition: rebuildall.php:38
DB_SLAVE
const DB_SLAVE
Definition: Defines.php:55
Maintenance\output
output( $out, $channel=null)
Throw some output to the user.
Definition: Maintenance.php:314