Merge "IEUrlExtension: Add tests for the main use case the lib exists for"
[lhc/web/wiklou.git] / maintenance / rebuildtextindex.php
index 722db26..e29d89e 100644 (file)
@@ -59,15 +59,18 @@ class RebuildTextIndex extends Maintenance {
                $this->db = wfGetDB( DB_MASTER );
                if ( $this->db->getType() == 'sqlite' ) {
                        if ( !DatabaseSqlite::getFulltextSearchModule() ) {
-                               $this->error( "Your version of SQLite module for PHP doesn't support full-text search (FTS3).\n", true );
+                               $this->error( "Your version of SQLite module for PHP doesn't "
+                                       . "support full-text search (FTS3).\n", true );
                        }
                        if ( !$this->db->checkForEnabledSearch() ) {
-                               $this->error( "Your database schema is not configured for full-text search support. Run update.php.\n", true );
+                               $this->error( "Your database schema is not configured for "
+                                       . "full-text search support. Run update.php.\n", true );
                        }
                }
 
                if ( $this->db->getType() == 'mysql' ) {
                        $this->dropMysqlTextIndex();
+                       $this->clearSearchIndex();
                        $this->populateSearchIndex();
                        $this->createMysqlTextIndex();
                } else {