Fixed bug in edit conflict merge feature -- didn't decompress old_text
[lhc/web/wiklou.git] / maintenance / rebuildrecentchanges.php
index 894353f..3ea838b 100644 (file)
@@ -1,4 +1,4 @@
-<?
+<?php
 
 # Rebuild link tracking tables from scratch.  This takes several
 # hours, depending on the database size and server configuration.
@@ -9,12 +9,16 @@ if ( ! is_readable( "../LocalSettings.php" ) ) {
        exit();
 }
 
+$wgCommandLineMode = true;
 $DP = "../includes";
-include_once( "../LocalSettings.php" );
-include_once( "../AdminSettings.php" );
+require_once( "../LocalSettings.php" );
+require_once( "../AdminSettings.php" );
 
-include_once( "{$IP}/Setup.php" );
-include_once( "./rebuildrecentchanges.inc" );
+$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
+ini_set( "include_path", "$IP$sep$include_path" );
+
+require_once( "Setup.php" );
+require_once( "./rebuildrecentchanges.inc" );
 $wgTitle = Title::newFromText( "Rebuild recent changes script" );
 set_time_limit(0);