28require_once __DIR__ .
'/Maintenance.php';
38 parent::__construct();
39 $this->
addDescription(
'Rebuild links, text index and recent changes' );
44 return Maintenance::DB_ADMIN;
50 $this->
output(
"** Rebuilding fulltext search index (if you abort "
51 .
"this will break searching; run this script again to fix):\n" );
52 $rebuildText = $this->
createChild( RebuildTextIndex::class,
'rebuildtextindex.php' );
53 $rebuildText->execute();
57 $this->
output(
"\n\n** Rebuilding recentchanges table:\n" );
58 $rebuildRC = $this->
createChild( RebuildRecentchanges::class,
'rebuildrecentchanges.php' );
59 $rebuildRC->execute();
62 $this->
output(
"\n\n** Rebuilding links tables -- this can take a long time. "
63 .
"It should be safe to abort via ctrl+C if you get bored.\n" );
64 $rebuildLinks = $this->
createChild( RefreshLinks::class,
'refreshLinks.php' );
65 $rebuildLinks->execute();
67 $this->
output(
"Done.\n" );
73require_once RUN_MAINTENANCE_IF_MAIN;
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
createChild(string $maintClass, ?string $classFile=null)
Returns an instance of the given maintenance script, with all of the current arguments passed to it.
output( $out, $channel=null)
Throw some output to the user.
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...