Merge "Collapse some nested if statements"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 4 Apr 2019 19:29:31 +0000 (19:29 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 4 Apr 2019 19:29:31 +0000 (19:29 +0000)
1  2 
includes/installer/SqliteInstaller.php

@@@ -332,10 -332,8 +332,8 @@@ EOT
                        if ( !is_writable( $file ) ) {
                                return Status::newFatal( 'config-sqlite-readonly', $file );
                        }
-               } else {
-                       if ( file_put_contents( $file, '' ) === false ) {
-                               return Status::newFatal( 'config-sqlite-cant-create-db', $file );
-                       }
+               } elseif ( file_put_contents( $file, '' ) === false ) {
+                       return Status::newFatal( 'config-sqlite-cant-create-db', $file );
                }
  
                return Status::newGood();
                'type' => 'sqlite',
                'dbname' => 'wikicache',
                'tablePrefix' => '',
 +              'variables' => [ 'synchronous' => 'NORMAL' ],
                'dbDirectory' => \$wgSQLiteDataDir,
                'trxMode' => 'IMMEDIATE',
                'flags' => 0
        'type' => 'sqlite',
        'dbname' => \"{\$wgDBname}_l10n_cache\",
        'tablePrefix' => '',
 +      'variables' => [ 'synchronous' => 'NORMAL' ],
        'dbDirectory' => \$wgSQLiteDataDir,
        'trxMode' => 'IMMEDIATE',
        'flags' => 0