Try to address some of the issues of r70608.
[lhc/web/wiklou.git] / config / Installer.php
index a41dd7a..c90ba44 100644 (file)
@@ -920,12 +920,9 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
                        if( !$ok ) { continue; }
                }
                else if ( $conf->DBtype == 'mssql' ) {
-                       error_reporting( E_ALL );
-                       $wgSuperUser = '';
-                       # # Possible connect as a superuser
+                       # Possible connect as a superuser
                        if ( $useRoot ) {
-                               $wgDBsuperuser = $conf->RootUser;
-                               echo( "<li>Attempting to connect to database \"{$conf->DBtype}\" as superuser \"{$wgDBsuperuser}\"" );
+                               echo( "<li>Attempting to connect to database \"{$conf->DBtype}\" as superuser \"{$conf->RootUser}\"" );
                                $wgDatabase = $dbc->newFromParams(
                                                                                $conf->DBserver,
                                                                                $conf->RootUser,
@@ -941,7 +938,7 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
                                        $errs['RootPW'] = 'and password';
                                        continue;
                                }
-                               $wgDatabase->initial_setup( $conf->RootPW, $conf->DBtype );
+                               $wgDatabase->initial_setup( $conf->DBname, $conf->DBuser, $conf->DBpassword );
                        }
                        echo( "<li>Attempting to connect to database \"{$wgDBname}\" as \"{$wgDBuser}\"..." );
                        $wgDatabase = $dbc->newFromParams(
@@ -1080,7 +1077,6 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
                        }
                } else { # not mysql
                        error_reporting( E_ALL | E_STRICT );
-                       $wgSuperUser = '';
                        ## Possible connect as a superuser
                        // Changed !mysql to postgres check since it seems to only apply to postgres
                        if( $useRoot && $conf->DBtype == 'postgres' ) {
@@ -1256,7 +1252,6 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
                                                break;
                                        }
                                }
-                               $wgDatabase->freeResult( $res );
                                if ( !$found && $conf->DBengine != 'MyISAM' ) {
                                        echo "<li><strong>Warning:</strong> " . htmlspecialchars( $conf->DBengine ) .
                                                " storage engine not available, " .
@@ -1711,6 +1706,7 @@ if( count( $errs ) ) {
        <div class="config-desc">
                <p>No MS SQL Server specific options at this time.</p>
        </div>
+       </fieldset>
        
        
        <?php database_switcher('ibm_db2'); ?>