r95023 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95022‎ | r95023 | r95024 >
Date:18:27, 19 August 2011
Author:maxsem
Status:ok (Comments)
Tags:
Comment:
Don't check for each database's availability twice. This halves the number of ugly message boxes seen during CLI installation on Windows if Oracle is not installed, but its bindings for PHP are.
Modified paths:
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/Installer.php
@@ -333,12 +333,14 @@
334334 $this->settings[$var] = $GLOBALS[$var];
335335 }
336336
 337+ $compiledDBs = array();
337338 foreach ( self::getDBTypes() as $type ) {
338339 $installer = $this->getDBInstaller( $type );
339340
340341 if ( !$installer->isCompiled() ) {
341342 continue;
342343 }
 344+ $compiledDBs[] = $type;
343345
344346 $defaults = $installer->getGlobalDefaults();
345347
@@ -350,6 +352,7 @@
351353 }
352354 }
353355 }
 356+ $this->setVar( '_CompiledDBs', $compiledDBs );
354357
355358 $this->parserTitle = Title::newFromText( 'Installer' );
356359 $this->parserOptions = new ParserOptions; // language will be wrong :(
@@ -622,19 +625,13 @@
623626 protected function envCheckDB() {
624627 global $wgLang;
625628
626 - $compiledDBs = array();
627629 $allNames = array();
628630
629631 foreach ( self::getDBTypes() as $name ) {
630 - if ( $this->getDBInstaller( $name )->isCompiled() ) {
631 - $compiledDBs[] = $name;
632 - }
633 - $allNames[] = wfMsg( 'config-type-' . $name );
 632+ $allNames[] = wfMsg( "config-type-$name" );
634633 }
635634
636 - $this->setVar( '_CompiledDBs', $compiledDBs );
637 -
638 - if ( !$compiledDBs ) {
 635+ if ( !$this->getVar( '_CompiledDBs' ) ) {
639636 $this->showError( 'config-no-db', $wgLang->commaList( $allNames ) );
640637 // @todo FIXME: This only works for the web installer!
641638 return false;

Follow-up revisions

RevisionCommit summaryAuthorDate
r95632MFT to REL1_18...hashar17:57, 28 August 2011

Comments

#Comment by MaxSem (talk | contribs)   22:15, 16 October 2011

Marking as fixme as DJ Bauch had problems with it. Need to investigate this.

#Comment by Hashar (talk | contribs)   10:49, 5 December 2011

What kind of trouble does DJ Bauch has? We need a bit more feedback to be able to fix any possible trouble :-)

#Comment by MaxSem (talk | contribs)   11:03, 5 December 2011

Namely, the list od databases appeared to change for him some time during installation. I tried reverting this revision and it seemed to help. Because it was just a couple of minutes before the hackathon ended, we had no time for further investigations. I guess this revision can be re-ok'd since there were no reports that it causes any problems with existing databases. Instead, we could revisit this when DJ's MSSQL branch will be ready.

#Comment by Hashar (talk | contribs)   16:52, 5 December 2011

Thanks MaxSem for the quick reply! Marking 'ok' again.

Status & tagging log