r74109 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74108‎ | r74109 | r74110 >
Date:21:06, 1 October 2010
Author:maxsem
Status:resolved (Comments)
Tags:
Comment:
Installer: added an environment check for SQLite search capabilities
Modified paths:
  • /trunk/phase3/includes/installer/Installer.i18n.php (modified) (history)
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/Installer.php
@@ -443,6 +443,16 @@
444444 }
445445
446446 $this->showMessage( 'config-have-db', $wgLang->listToText( $goodNames ), count( $goodNames ) );
 447+
 448+ // Check for FTS3 full-text search module
 449+ $sqlite = $this->getDBInstaller( $name );
 450+ if ( $sqlite->isCompiled() ) {
 451+ $db = new DatabaseSqliteStandalone( ':memory:' );
 452+ $this->showMessage( $db->getFulltextSearchModule() == 'FTS3'
 453+ ? 'config-have-fts3'
 454+ : 'config-no-fts3'
 455+ );
 456+ }
447457 }
448458
449459 /**
Index: trunk/phase3/includes/installer/Installer.i18n.php
@@ -96,6 +96,8 @@
9797 If you compiled PHP yourself, reconfigure it with a database client enabled, for example using <code>./configure --with-mysql</code>.
9898 If you installed PHP from a Debian or Ubuntu package, then you also need install the php5-mysql module.',
9999 'config-have-db' => 'Found database {{PLURAL:$2|driver|drivers}}: $1.',
 100+ 'config-have-fts3' => 'SQLite is compiled with the [http://sqlite.org/fts3.html FTS3] module, search features will be available on this backend.',
 101+ 'config-no-fts3' => "'''Warning''': SQLite is compiled without the [http://sqlite.org/fts3.html FTS3] module, search features will be unavailable on this backend.",
100102 'config-register-globals' => "'''Warning: PHP's <code>[http://php.net/register_globals register_globals]</code> option is enabled.'''
101103 '''Disable it if you can.'''
102104 MediaWiki will work, but your server is exposed to potential security vulnerabilities.",

Follow-up revisions

RevisionCommit summaryAuthorDate
r74804Fixed stupid copy+paste error from r74109maxsem14:11, 15 October 2010

Comments

#Comment by Freakolowsky (talk | contribs)   13:26, 15 October 2010

FTS3 check code only works if sqlite is the last value int the gbTypes array.

#Comment by MaxSem (talk | contribs)   14:13, 15 October 2010

Thanks, fixed in r74804.

Status & tagging log