http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95023

Revision: 95023
Author:   maxsem
Date:     2011-08-19 18:27:35 +0000 (Fri, 19 Aug 2011)
Log Message:
-----------
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: trunk/phase3/includes/installer/Installer.php
===================================================================
--- trunk/phase3/includes/installer/Installer.php       2011-08-19 17:59:07 UTC 
(rev 95022)
+++ trunk/phase3/includes/installer/Installer.php       2011-08-19 18:27:35 UTC 
(rev 95023)
@@ -333,12 +333,14 @@
                        $this->settings[$var] = $GLOBALS[$var];
                }
 
+               $compiledDBs = array();
                foreach ( self::getDBTypes() as $type ) {
                        $installer = $this->getDBInstaller( $type );
 
                        if ( !$installer->isCompiled() ) {
                                continue;
                        }
+                       $compiledDBs[] = $type;
 
                        $defaults = $installer->getGlobalDefaults();
 
@@ -350,6 +352,7 @@
                                }
                        }
                }
+               $this->setVar( '_CompiledDBs', $compiledDBs );
 
                $this->parserTitle = Title::newFromText( 'Installer' );
                $this->parserOptions = new ParserOptions; // language will  be 
wrong :(
@@ -622,19 +625,13 @@
        protected function envCheckDB() {
                global $wgLang;
 
-               $compiledDBs = array();
                $allNames = array();
 
                foreach ( self::getDBTypes() as $name ) {
-                       if ( $this->getDBInstaller( $name )->isCompiled() ) {
-                               $compiledDBs[] = $name;
-                       }
-                       $allNames[] = wfMsg( 'config-type-' . $name );
+                       $allNames[] = wfMsg( "config-type-$name" );
                }
 
-               $this->setVar( '_CompiledDBs', $compiledDBs );
-
-               if ( !$compiledDBs ) {
+               if ( !$this->getVar( '_CompiledDBs' ) ) {
                        $this->showError( 'config-no-db', $wgLang->commaList( 
$allNames ) );
                        // @todo FIXME: This only works for the web installer!
                        return false;


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to