diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2012-05-03 13:01:35 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2012-05-03 13:01:35 +0200 |
commit | d9022f63880ce039446fba8364f68e656b7bf4cb (patch) | |
tree | 16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/installer/SqliteInstaller.php | |
parent | 27cf83d177256813e2e802241085fce5dd0f3fb9 (diff) |
Update to MediaWiki 1.19.0
Diffstat (limited to 'includes/installer/SqliteInstaller.php')
-rw-r--r-- | includes/installer/SqliteInstaller.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/includes/installer/SqliteInstaller.php b/includes/installer/SqliteInstaller.php index 144e710d..658a3b16 100644 --- a/includes/installer/SqliteInstaller.php +++ b/includes/installer/SqliteInstaller.php @@ -13,6 +13,7 @@ * @since 1.17 */ class SqliteInstaller extends DatabaseInstaller { + const MINIMUM_VERSION = '3.3.7'; /** * @var DatabaseSqlite @@ -32,6 +33,24 @@ class SqliteInstaller extends DatabaseInstaller { return self::checkExtension( 'pdo_sqlite' ); } + /** + * + * @return Status: + */ + public function checkPrerequisites() { + $result = Status::newGood(); + // Bail out if SQLite is too old + $db = new DatabaseSqliteStandalone( ':memory:' ); + if ( version_compare( $db->getServerVersion(), self::MINIMUM_VERSION, '<' ) ) { + $result->fatal( 'config-outdated-sqlite', $db->getServerVersion(), self::MINIMUM_VERSION ); + } + // Check for FTS3 full-text search module + if( DatabaseSqlite::getFulltextSearchModule() != 'FTS3' ) { + $result->warning( 'config-no-fts3' ); + } + return $result; + } + public function getGlobalDefaults() { if ( isset( $_SERVER['DOCUMENT_ROOT'] ) ) { $path = str_replace( @@ -102,7 +121,7 @@ class SqliteInstaller extends DatabaseInstaller { # if it's still writable if ( $create ) { wfSuppressWarnings(); - $ok = wfMkdirParents( $dir, 0700 ); + $ok = wfMkdirParents( $dir, 0700, __METHOD__ ); wfRestoreWarnings(); if ( !$ok ) { return Status::newFatal( 'config-sqlite-mkdir-error', $dir ); |