summaryrefslogtreecommitdiff
path: root/maintenance/rebuildall.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2006-10-11 18:12:39 +0000
committerPierre Schmitz <pierre@archlinux.de>2006-10-11 18:12:39 +0000
commit183851b06bd6c52f3cae5375f433da720d410447 (patch)
treea477257decbf3360127f6739c2f9d0ec57a03d39 /maintenance/rebuildall.php
MediaWiki 1.7.1 wiederhergestellt
Diffstat (limited to 'maintenance/rebuildall.php')
-rw-r--r--maintenance/rebuildall.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/maintenance/rebuildall.php b/maintenance/rebuildall.php
new file mode 100644
index 00000000..7c44e300
--- /dev/null
+++ b/maintenance/rebuildall.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Rebuild link tracking tables from scratch. This takes several
+ * hours, depending on the database size and server configuration.
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
+require_once( "commandLine.inc" );
+
+#require_once( "rebuildlinks.inc" );
+require_once( "refreshLinks.inc" );
+require_once( "rebuildtextindex.inc" );
+require_once( "rebuildrecentchanges.inc" );
+
+$database = Database::newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname );
+
+print "** Rebuilding fulltext search index (if you abort this will break searching; run this script again to fix):\n";
+dropTextIndex( $database );
+rebuildTextIndex( $database );
+createTextIndex( $database );
+
+print "\n\n** Rebuilding recentchanges table:\n";
+rebuildRecentChangesTablePass1();
+rebuildRecentChangesTablePass2();
+
+# Doesn't work anymore
+# rebuildLinkTables();
+
+# Use the slow incomplete one instead. It's designed to work in the background
+print "\n\n** Rebuilding links tables -- this can take a long time. It should be safe to abort via ctrl+C if you get bored.\n";
+refreshLinks( 1 );
+
+print "Done.\n";
+exit();
+
+?>