summaryrefslogtreecommitdiff
path: root/maintenance/rebuildall.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
commit370e83bb0dfd0c70de268c93bf07ad5ee0897192 (patch)
tree491674f4c242e4d6ba0d04eafa305174c35a3391 /maintenance/rebuildall.php
parentf4debf0f12d0524d2b2427c55ea3f16b680fad97 (diff)
Update auf 1.13.0
Diffstat (limited to 'maintenance/rebuildall.php')
-rw-r--r--maintenance/rebuildall.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/maintenance/rebuildall.php b/maintenance/rebuildall.php
index 1c2647b2..ca7e4c06 100644
--- a/maintenance/rebuildall.php
+++ b/maintenance/rebuildall.php
@@ -2,8 +2,10 @@
/**
* Rebuild link tracking tables from scratch. This takes several
* hours, depending on the database size and server configuration.
+ *
+ * @file
* @todo document
- * @addtogroup Maintenance
+ * @ingroup Maintenance
*/
/** */
@@ -14,12 +16,15 @@ require_once( "refreshLinks.inc" );
require_once( "rebuildtextindex.inc" );
require_once( "rebuildrecentchanges.inc" );
-$database = Database::newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname );
+$dbclass = 'Database' . ucfirst( $wgDBtype ) ;
+$database = new $dbclass( $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 );
+if ($wgDBtype == 'mysql') {
+ 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";
rebuildRecentChangesTable();