r80887 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80886‎ | r80887 | r80888 >
Date:17:37, 24 January 2011
Author:demon
Status:ok
Tags:
Comment:
Followup r80864: DatabaseSqlite exploded on installer page because it tried to open an invalid $wgSqliteDataDir.

Even though it doesn't use $server, only call open() if it's set, like in the other constructors.

The amount of code duplication here is stupid.
Modified paths:
  • /trunk/phase3/includes/db/DatabaseSqlite.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseSqlite.php
@@ -28,8 +28,10 @@
2929 $this->mFlags = $flags;
3030 $this->mName = $dbName;
3131
32 - if ( $this->open( $server, $user, $password, $dbName ) && $wgSharedDB ) {
33 - $this->attachDatabase( $wgSharedDB );
 32+ if( $server ) {
 33+ if ( $this->open( $server, $user, $password, $dbName ) && $wgSharedDB ) {
 34+ $this->attachDatabase( $wgSharedDB );
 35+ }
3436 }
3537 }
3638

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80864Followup to r79848 (and really, make it useful...)...demon16:31, 24 January 2011

Status & tagging log