From: Max Semenik Date: Fri, 1 Oct 2010 21:06:32 +0000 (+0000) Subject: Installer: added an environment check for SQLite search capabilities X-Git-Tag: 1.31.0-rc.0~34697 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=09b80ec98104303e9e1c86b9b72227eeda6c01ff;p=lhc%2Fweb%2Fwiklou.git Installer: added an environment check for SQLite search capabilities --- diff --git a/includes/installer/Installer.i18n.php b/includes/installer/Installer.i18n.php index e3d781147a..bd9b6bca89 100644 --- a/includes/installer/Installer.i18n.php +++ b/includes/installer/Installer.i18n.php @@ -96,6 +96,8 @@ If you are on shared hosting, ask your hosting provider to install a suitable da If you compiled PHP yourself, reconfigure it with a database client enabled, for example using ./configure --with-mysql. If you installed PHP from a Debian or Ubuntu package, then you also need install the php5-mysql module.', 'config-have-db' => 'Found database {{PLURAL:$2|driver|drivers}}: $1.', + 'config-have-fts3' => 'SQLite is compiled with the [http://sqlite.org/fts3.html FTS3] module, search features will be available on this backend.', + 'config-no-fts3' => "'''Warning''': SQLite is compiled without the [http://sqlite.org/fts3.html FTS3] module, search features will be unavailable on this backend.", 'config-register-globals' => "'''Warning: PHP's [http://php.net/register_globals register_globals] option is enabled.''' '''Disable it if you can.''' MediaWiki will work, but your server is exposed to potential security vulnerabilities.", diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 91b5956a5f..c296cfe536 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -443,6 +443,16 @@ abstract class Installer { } $this->showMessage( 'config-have-db', $wgLang->listToText( $goodNames ), count( $goodNames ) ); + + // Check for FTS3 full-text search module + $sqlite = $this->getDBInstaller( $name ); + if ( $sqlite->isCompiled() ) { + $db = new DatabaseSqliteStandalone( ':memory:' ); + $this->showMessage( $db->getFulltextSearchModule() == 'FTS3' + ? 'config-have-fts3' + : 'config-no-fts3' + ); + } } /**