Replace the call to action=raw with a couple API calls for the main
[lhc/web/wiklou.git] / maintenance / rebuildrecentchanges.php
index 8949b76..4231ff7 100644 (file)
@@ -1,34 +1,24 @@
 <?php
-
-# Rebuild link tracking tables from scratch.  This takes several
-# hours, depending on the database size and server configuration.
-
-if ( ! is_readable( "../LocalSettings.php" ) ) {
-       print "A copy of your installation's LocalSettings.php\n" .
-         "must exist in the source directory.\n";
-       exit();
-}
-
-$wgCommandLineMode = true;
-$DP = "../includes";
-include_once( "../LocalSettings.php" );
-include_once( "../AdminSettings.php" );
-
-$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
-ini_set( "include_path", "$IP$sep$include_path" );
-
-include_once( "Setup.php" );
-include_once( "./rebuildrecentchanges.inc" );
+/**
+ * Rebuild link tracking tables from scratch.  This takes several
+ * hours, depending on the database size and server configuration.
+ *
+ * @file
+ * @todo document
+ * @ingroup Maintenance
+ */
+
+/** */
+require_once( "commandLine.inc" );
+require_once( "rebuildrecentchanges.inc" );
 $wgTitle = Title::newFromText( "Rebuild recent changes script" );
-set_time_limit(0);
 
 $wgDBuser                      = $wgDBadminuser;
 $wgDBpassword          = $wgDBadminpassword;
 
-rebuildRecentChangesTablePass1();
-rebuildRecentChangesTablePass2();
+rebuildRecentChangesTable();
 
 print "Done.\n";
-exit();
+exit(0);
+
 
-?>