Maintenance script fixes
[lhc/web/wiklou.git] / maintenance / rebuildlinks.php
1 <?
2
3 # Rebuild link tracking tables from scratch. This takes several
4 # hours, depending on the database size and server configuration.
5
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();
10 }
11
12 $wgCommandLineMode = true;
13 $DP = "../includes";
14 include_once( "../LocalSettings.php" );
15 include_once( "../AdminSettings.php" );
16
17 $sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
18 ini_set( "include_path", "$IP$sep$include_path" );
19
20 include_once( "Setup.php" );
21 include_once( "./rebuildlinks.inc" );
22 $wgTitle = Title::newFromText( "Rebuild links script" );
23 set_time_limit(0);
24
25 $wgDBuser = $wgDBadminuser;
26 $wgDBpassword = $wgDBadminpassword;
27
28 rebuildLinkTablesPass1();
29 rebuildLinkTablesPass2();
30
31 print "Done.\n";
32 exit();
33
34 ?>