r75823 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75822‎ | r75823 | r75824 >
Date:20:14, 1 November 2010
Author:maxsem
Status:ok
Tags:
Comment:
Made rebuildtextindex.php bail out if search is not supported.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/maintenance/rebuildtextindex.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/rebuildtextindex.php
@@ -48,9 +48,18 @@
4949 }
5050
5151 $this->db = wfGetDB( DB_MASTER );
 52+ if ( $this->db->getType() == 'sqlite' ) {
 53+ if ( !$this->db->getFulltextSearchModule() ) {
 54+ $this->error( "Your version of SQLite module for PHP doesn't support full-text search (FTS3).\n" );
 55+ }
 56+ if ( !$this->db->checkForEnabledSearch() ) {
 57+ $this->error( "Your database schema is not configured for full-text search support. Run update.php.\n" );
 58+ }
 59+ }
 60+
5261 $wgTitle = Title::newFromText( "Rebuild text index script" );
5362
54 - if ( $wgDBtype == 'mysql' ) {
 63+ if ( $this->db->getType() == 'mysql' ) {
5564 $this->dropMysqlTextIndex();
5665 $this->populateSearchIndex();
5766 $this->createMysqlTextIndex();
Index: trunk/phase3/RELEASE-NOTES
@@ -186,6 +186,7 @@
187187 * Use hreflang to specify canonical and alternate links, search engine friendly
188188 when a wiki has multiple variant languages.
189189 * (bug 19593) Specifying --server in now works for all maintenance scripts
 190+* Now rebuildtextindex.php warns if SQLite doesn't support full-text search.
190191
191192 === Bug fixes in 1.17 ===
192193 * (bug 17560) Half-broken deletion moved image files to deletion archive

Status & tagging log