r46903 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46902‎ | r46903 | r46904 >
Date:10:14, 6 February 2009
Author:ialex
Status:deferred
Tags:
Comment:
Fix PostgreSQL installer so that it works properly
Modified paths:
  • /branches/new-installer/phase3/includes/installer/PostgresInstaller.php (modified) (history)

Diff [purge]

Index: branches/new-installer/phase3/includes/installer/PostgresInstaller.php
@@ -13,8 +13,8 @@
1414 );
1515
1616 var $internalDefaults = array(
17 - '_PostgresInstallUser' => 'postgres',
18 - '_PostgresInstallPassword' => '',
 17+ '_InstallUser' => 'postgres',
 18+ '_InstallPassword' => '',
1919 );
2020
2121 var $minimumVersion = '8.1';
@@ -72,6 +72,14 @@
7373 $status->fatal( 'config-invalid-ts2schema', $newValues['wgDBts2schema'] );
7474 }
7575
 76+ // Submit user box
 77+ if ( $status->isOK() ) {
 78+ $status->merge( $this->submitInstallUserBox() );
 79+ }
 80+ if ( !$status->isOK() ) {
 81+ return $status;
 82+ }
 83+
7684 // Try to connect
7785 if ( $status->isOK() ) {
7886 $status->merge( $this->attemptConnection() );
@@ -94,9 +102,10 @@
95103 try {
96104 $this->conn = new DatabasePostgres(
97105 $this->getVar( 'wgDBserver' ),
98 - $this->getVar( '_PostgresInstallUser' ),
99 - $this->getVar( '_PostgresInstallPassword' ),
 106+ $this->getVar( '_InstallUser' ),
 107+ $this->getVar( '_InstallPassword' ),
100108 'postgres' );
 109+ $status->value = $this->conn;
101110 } catch ( DBConnectionError $e ) {
102111 $status->fatal( 'config-connection-error', $e->getMessage() );
103112 }
@@ -104,12 +113,7 @@
105114 }
106115
107116 function getConnection() {
108 - $status = $this->attemptConnection();
109 - if ( $status->isOK() ) {
110 - return $this->conn;
111 - } else {
112 - return $status;
113 - }
 117+ return $this->attemptConnection();
114118 }
115119
116120 function getSettingsForm() {

Status & tagging log