summaryrefslogtreecommitdiff
path: root/includes/installer/SqliteInstaller.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/installer/SqliteInstaller.php')
-rw-r--r--includes/installer/SqliteInstaller.php38
1 files changed, 31 insertions, 7 deletions
diff --git a/includes/installer/SqliteInstaller.php b/includes/installer/SqliteInstaller.php
index 68df6ab2..19218c60 100644
--- a/includes/installer/SqliteInstaller.php
+++ b/includes/installer/SqliteInstaller.php
@@ -60,9 +60,10 @@ class SqliteInstaller extends DatabaseInstaller {
$result->fatal( 'config-outdated-sqlite', $db->getServerVersion(), self::MINIMUM_VERSION );
}
// Check for FTS3 full-text search module
- if( DatabaseSqlite::getFulltextSearchModule() != 'FTS3' ) {
+ if ( DatabaseSqlite::getFulltextSearchModule() != 'FTS3' ) {
$result->warning( 'config-no-fts3' );
}
+
return $result;
}
@@ -73,6 +74,7 @@ class SqliteInstaller extends DatabaseInstaller {
DIRECTORY_SEPARATOR,
dirname( $_SERVER['DOCUMENT_ROOT'] ) . '/data'
);
+
return array( 'wgSQLiteDataDir' => $path );
} else {
return array();
@@ -80,8 +82,17 @@ class SqliteInstaller extends DatabaseInstaller {
}
public function getConnectForm() {
- return $this->getTextBox( 'wgSQLiteDataDir', 'config-sqlite-dir', array(), $this->parent->getHelpBox( 'config-sqlite-dir-help' ) ) .
- $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-sqlite-name-help' ) );
+ return $this->getTextBox(
+ 'wgSQLiteDataDir',
+ 'config-sqlite-dir', array(),
+ $this->parent->getHelpBox( 'config-sqlite-dir-help' )
+ ) .
+ $this->getTextBox(
+ 'wgDBname',
+ 'config-db-name',
+ array(),
+ $this->parent->getHelpBox( 'config-sqlite-name-help' )
+ );
}
/**
@@ -96,6 +107,7 @@ class SqliteInstaller extends DatabaseInstaller {
if ( !$result ) {
return $path;
}
+
return $result;
}
@@ -115,6 +127,7 @@ class SqliteInstaller extends DatabaseInstaller {
}
# Table prefix is not used on SQLite, keep it empty
$this->setVar( 'wgDBprefix', '' );
+
return $result;
}
@@ -128,9 +141,16 @@ class SqliteInstaller extends DatabaseInstaller {
if ( !is_writable( dirname( $dir ) ) ) {
$webserverGroup = Installer::maybeGetWebserverPrimaryGroup();
if ( $webserverGroup !== null ) {
- return Status::newFatal( 'config-sqlite-parent-unwritable-group', $dir, dirname( $dir ), basename( $dir ), $webserverGroup );
+ return Status::newFatal(
+ 'config-sqlite-parent-unwritable-group',
+ $dir, dirname( $dir ), basename( $dir ),
+ $webserverGroup
+ );
} else {
- return Status::newFatal( 'config-sqlite-parent-unwritable-nogroup', $dir, dirname( $dir ), basename( $dir ) );
+ return Status::newFatal(
+ 'config-sqlite-parent-unwritable-nogroup',
+ $dir, dirname( $dir ), basename( $dir )
+ );
}
}
@@ -173,6 +193,7 @@ class SqliteInstaller extends DatabaseInstaller {
} catch ( DBConnectionError $e ) {
$status->fatal( 'config-sqlite-connection-error', $e->getMessage() );
}
+
return $status;
}
@@ -220,6 +241,7 @@ class SqliteInstaller extends DatabaseInstaller {
$this->setVar( 'wgDBuser', '' );
$this->setVar( 'wgDBpassword', '' );
$this->setupSchemaVars();
+
return $this->getConnection();
}
@@ -228,6 +250,7 @@ class SqliteInstaller extends DatabaseInstaller {
*/
public function createTables() {
$status = parent::createTables();
+
return $this->setupSearchIndex( $status );
}
@@ -246,6 +269,7 @@ class SqliteInstaller extends DatabaseInstaller {
} elseif ( !$fts3tTable && $module == 'FTS3' ) {
$this->db->sourceFile( "$IP/maintenance/sqlite/archives/searchindex-fts3.sql" );
}
+
return $status;
}
@@ -254,8 +278,8 @@ class SqliteInstaller extends DatabaseInstaller {
*/
public function getLocalSettings() {
$dir = LocalSettingsGenerator::escapePhpString( $this->getVar( 'wgSQLiteDataDir' ) );
- return
-"# SQLite-specific settings
+
+ return "# SQLite-specific settings
\$wgSQLiteDataDir = \"{$dir}\";";
}
}