Some adjustments
[lhc/web/wiklou.git] / maintenance / rebuildlinks.php
index de756c1..8423a6a 100644 (file)
@@ -9,11 +9,15 @@ if ( ! is_readable( "../LocalSettings.php" ) ) {
        exit();
 }
 
+$wgCommandLineMode = true;
 $DP = "../includes";
 include_once( "../LocalSettings.php" );
 include_once( "../AdminSettings.php" );
 
-include_once( "{$IP}/Setup.php" );
+$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
+ini_set( "include_path", "$IP$sep$include_path" );
+
+include_once( "Setup.php" );
 include_once( "./rebuildlinks.inc" );
 $wgTitle = Title::newFromText( "Rebuild links script" );
 set_time_limit(0);
@@ -21,8 +25,7 @@ set_time_limit(0);
 $wgDBuser                      = $wgDBadminuser;
 $wgDBpassword          = $wgDBadminpassword;
 
-rebuildLinkTablesPass1();
-rebuildLinkTablesPass2();
+rebuildLinkTables();
 
 print "Done.\n";
 exit();