diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2007-09-14 13:18:58 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2007-09-14 13:18:58 +0200 |
commit | 8f416baead93a48e5799e44b8bd2e2c4859f4e04 (patch) | |
tree | cd47ac55eb80a39e3225e8b4f3161b88ea16c2cf /maintenance/rebuildtextindex.php | |
parent | d7d08bd1a17618c7d77a6b9b2989e9f7293d6ed6 (diff) |
auf Version 1.11 aktualisiert; Login-Bug behoben
Diffstat (limited to 'maintenance/rebuildtextindex.php')
-rw-r--r-- | maintenance/rebuildtextindex.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/maintenance/rebuildtextindex.php b/maintenance/rebuildtextindex.php index 6f31cbb6..47d297a9 100644 --- a/maintenance/rebuildtextindex.php +++ b/maintenance/rebuildtextindex.php @@ -3,6 +3,9 @@ * Rebuild search index table from scratch. This takes several * hours, depending on the database size and server configuration. * + * This is only for MySQL (see bug 9905). For postgres we can probably + * use SearchPostgres::update($pageid); + * * @todo document * @addtogroup Maintenance */ @@ -10,9 +13,14 @@ /** */ require_once( "commandLine.inc" ); require_once( "rebuildtextindex.inc" ); -$wgTitle = Title::newFromText( "Rebuild text index script" ); -$database = Database::newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname ); +$database = wfGetDB( DB_MASTER ); +if( !$database instanceof DatabaseMysql ) { + print "This script is only for MySQL.\n"; + exit(); +} + +$wgTitle = Title::newFromText( "Rebuild text index script" ); dropTextIndex( $database ); rebuildTextIndex( $database ); @@ -21,4 +29,4 @@ createTextIndex( $database ); print "Done.\n"; exit(); -?> + |