aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/rebuildall.php
diff options
context:
space:
mode:
authorTim Starling <tstarling@users.mediawiki.org>2004-06-15 15:18:50 +0000
committerTim Starling <tstarling@users.mediawiki.org>2004-06-15 15:18:50 +0000
commit2ba5e0e71834eb363242f73d0d0977ed6537fa9a (patch)
treed9ed21ab0d381457ecd8803a383b0096e0f1c0f5 /maintenance/rebuildall.php
parent498b4d60bd8ced58076ec4c2ac8013fcedc8d283 (diff)
downloadmediawikicore-2ba5e0e71834eb363242f73d0d0977ed6537fa9a.tar.gz
mediawikicore-2ba5e0e71834eb363242f73d0d0977ed6537fa9a.zip
* Moved content from liveCmdLine.inc into commandLine.inc, obsoleting the former.
* Put some option handling code in commandLine.inc which is untested and unused (for the moment). * Converted all existing command line scripts to use the standard header and argument array. * Did a quick test of compressOld.php, rebuildall.php and rebuildMessages.php to check for breakage. * rebuildall.php was broken due to the unmaintained rebuildlinks.php, so I converted it to use refreshLinks instead. Required splitting into refreshLinks.inc and refreshLinks.php
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/4083
Diffstat (limited to 'maintenance/rebuildall.php')
-rw-r--r--maintenance/rebuildall.php32
1 files changed, 11 insertions, 21 deletions
diff --git a/maintenance/rebuildall.php b/maintenance/rebuildall.php
index a9d0a9760430..d9ec307c06c0 100644
--- a/maintenance/rebuildall.php
+++ b/maintenance/rebuildall.php
@@ -3,31 +3,21 @@
# 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";
-require_once( "../LocalSettings.php" );
-require_once( "../AdminSettings.php" );
-
-$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
-ini_set( "include_path", "$IP$sep$include_path" );
-
-require_once( "Setup.php" );
-require_once( "./rebuildlinks.inc" );
-require_once( "./rebuildtextindex.inc" );
-require_once( "./rebuildrecentchanges.inc" );
-$wgTitle = Title::newFromText( "Rebuild links script" );
-set_time_limit(0);
+require_once( "commandLine.inc" );
+
+#require_once( "rebuildlinks.inc" );
+require_once( "refreshlinks.inc" );
+require_once( "rebuildtextindex.inc" );
+require_once( "rebuildrecentchanges.inc" );
$wgDBuser = $wgDBadminuser;
$wgDBpassword = $wgDBadminpassword;
-rebuildLinkTables();
+# Doesn't work anymore
+# rebuildLinkTables();
+
+# Use the slow incomplete one instead. It's designed to work in the background
+#refreshLinks( 1 );
dropTextIndex();
rebuildTextIndex();