28require_once __DIR__ .
'/Maintenance.php';
38 parent::__construct();
39 $this->
addDescription(
'Rebuild links, text index and recent changes' );
43 return Maintenance::DB_ADMIN;
49 $this->
output(
"** Rebuilding fulltext search index (if you abort "
50 .
"this will break searching; run this script again to fix):\n" );
51 $rebuildText = $this->
runChild( RebuildTextIndex::class,
'rebuildtextindex.php' );
52 $rebuildText->execute();
56 $this->
output(
"\n\n** Rebuilding recentchanges table:\n" );
57 $rebuildRC = $this->
runChild( RebuildRecentchanges::class,
'rebuildrecentchanges.php' );
58 $rebuildRC->execute();
61 $this->
output(
"\n\n** Rebuilding links tables -- this can take a long time. "
62 .
"It should be safe to abort via ctrl+C if you get bored.\n" );
63 $rebuildLinks = $this->
runChild( RefreshLinks::class,
'refreshLinks.php' );
64 $rebuildLinks->execute();
66 $this->
output(
"Done.\n" );
72require_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.
runChild( $maintClass, $classFile=null)
Returns an instance of the given maintenance script, with all of the current arguments passed to it.
addDescription( $text)
Set the description text.
Maintenance script that rebuilds link tracking tables from scratch.
__construct()
Default constructor.
execute()
Do the actual work.
getDbType()
Does the script need different DB access? By default, we give Maintenance scripts normal rights to th...