Hoo man has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311476

Change subject: Fix SqliteInstaller DatabaseSqlite creation
......................................................................

Fix SqliteInstaller DatabaseSqlite creation

Follows 47e816c69c197fec86c344256d81d7c8f781b880

Change-Id: I1612b0a187ea1df272bdd304ffb2bafbc006b2e4
---
M includes/installer/SqliteInstaller.php
1 file changed, 2 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/311476/1

diff --git a/includes/installer/SqliteInstaller.php 
b/includes/installer/SqliteInstaller.php
index d59c162..899648b 100644
--- a/includes/installer/SqliteInstaller.php
+++ b/includes/installer/SqliteInstaller.php
@@ -179,16 +179,12 @@
         * @return Status
         */
        public function openConnection() {
-               global $wgSQLiteDataDir;
-
                $status = Status::newGood();
                $dir = $this->getVar( 'wgSQLiteDataDir' );
                $dbName = $this->getVar( 'wgDBname' );
                try {
                        # @todo FIXME: Need more sensible constructor 
parameters, e.g. single associative array
-                       # Setting globals kind of sucks
-                       $wgSQLiteDataDir = $dir;
-                       $db = DatabaseBase::factory( 'sqlite', [ 'dbname' => 
$dbName ] );
+                       $db = DatabaseBase::factory( 'sqlite', [ 'dbname' => 
$dbName, 'dbDirectory' => $dir ] );
                        $status->value = $db;
                } catch ( DBConnectionError $e ) {
                        $status->fatal( 'config-sqlite-connection-error', 
$e->getMessage() );
@@ -243,10 +239,7 @@
 
                # Create the global cache DB
                try {
-                       global $wgSQLiteDataDir;
-                       # @todo FIXME: setting globals kind of sucks
-                       $wgSQLiteDataDir = $dir;
-                       $conn = DatabaseBase::factory( 'sqlite', [ 'dbname' => 
"wikicache" ] );
+                       $conn = DatabaseBase::factory( 'sqlite', [ 'dbname' => 
'wikicache', 'dbDirectory' => $dir  ] );
                        # @todo: don't duplicate objectcache definition, though 
it's very simple
                        $sql =
 <<<EOT

-- 
To view, visit https://gerrit.wikimedia.org/r/311476
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1612b0a187ea1df272bdd304ffb2bafbc006b2e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hoo man <h...@online.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to