Index: branches/new-installer/phase3/includes/installer/PostgresInstaller.php |
— | — | @@ -13,8 +13,8 @@ |
14 | 14 | ); |
15 | 15 | |
16 | 16 | var $internalDefaults = array( |
17 | | - '_PostgresInstallUser' => 'postgres', |
18 | | - '_PostgresInstallPassword' => '', |
| 17 | + '_InstallUser' => 'postgres', |
| 18 | + '_InstallPassword' => '', |
19 | 19 | ); |
20 | 20 | |
21 | 21 | var $minimumVersion = '8.1'; |
— | — | @@ -72,6 +72,14 @@ |
73 | 73 | $status->fatal( 'config-invalid-ts2schema', $newValues['wgDBts2schema'] ); |
74 | 74 | } |
75 | 75 | |
| 76 | + // Submit user box |
| 77 | + if ( $status->isOK() ) { |
| 78 | + $status->merge( $this->submitInstallUserBox() ); |
| 79 | + } |
| 80 | + if ( !$status->isOK() ) { |
| 81 | + return $status; |
| 82 | + } |
| 83 | + |
76 | 84 | // Try to connect |
77 | 85 | if ( $status->isOK() ) { |
78 | 86 | $status->merge( $this->attemptConnection() ); |
— | — | @@ -94,9 +102,10 @@ |
95 | 103 | try { |
96 | 104 | $this->conn = new DatabasePostgres( |
97 | 105 | $this->getVar( 'wgDBserver' ), |
98 | | - $this->getVar( '_PostgresInstallUser' ), |
99 | | - $this->getVar( '_PostgresInstallPassword' ), |
| 106 | + $this->getVar( '_InstallUser' ), |
| 107 | + $this->getVar( '_InstallPassword' ), |
100 | 108 | 'postgres' ); |
| 109 | + $status->value = $this->conn; |
101 | 110 | } catch ( DBConnectionError $e ) { |
102 | 111 | $status->fatal( 'config-connection-error', $e->getMessage() ); |
103 | 112 | } |
— | — | @@ -104,12 +113,7 @@ |
105 | 114 | } |
106 | 115 | |
107 | 116 | function getConnection() { |
108 | | - $status = $this->attemptConnection(); |
109 | | - if ( $status->isOK() ) { |
110 | | - return $this->conn; |
111 | | - } else { |
112 | | - return $status; |
113 | | - } |
| 117 | + return $this->attemptConnection(); |
114 | 118 | } |
115 | 119 | |
116 | 120 | function getSettingsForm() { |