changed code formatting, changed parser hook calling convention so updating will...
[mediawiki.git] / maintenance / rebuildall.php
bloba9d0a976043098f48f48d035cb50f58c4bb03a4e
1 <?php
3 # Rebuild link tracking tables from scratch. This takes several
4 # hours, depending on the database size and server configuration.
6 if ( ! is_readable( "../LocalSettings.php" ) ) {
7 print "A copy of your installation's LocalSettings.php\n" .
8 "must exist in the source directory.\n";
9 exit();
12 $wgCommandLineMode = true;
13 $DP = "../includes";
14 require_once( "../LocalSettings.php" );
15 require_once( "../AdminSettings.php" );
17 $sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
18 ini_set( "include_path", "$IP$sep$include_path" );
20 require_once( "Setup.php" );
21 require_once( "./rebuildlinks.inc" );
22 require_once( "./rebuildtextindex.inc" );
23 require_once( "./rebuildrecentchanges.inc" );
24 $wgTitle = Title::newFromText( "Rebuild links script" );
25 set_time_limit(0);
27 $wgDBuser = $wgDBadminuser;
28 $wgDBpassword = $wgDBadminpassword;
30 rebuildLinkTables();
32 dropTextIndex();
33 rebuildTextIndex();
34 createTextIndex();
36 rebuildRecentChangesTablePass1();
37 rebuildRecentChangesTablePass2();
39 print "Done.\n";
40 exit();