Index: trunk/phase3/includes/installer/PostgresInstaller.php |
— | — | @@ -276,13 +276,17 @@ |
277 | 277 | |
278 | 278 | $same = $this->getVar( 'wgDBuser' ) === $this->getVar( '_InstallUser' ); |
279 | 279 | |
280 | | - // Check if the web user exists |
281 | | - // Connect to the database with the install user |
282 | | - $status = $this->getPgConnection( 'create-db' ); |
283 | | - if ( !$status->isOK() ) { |
284 | | - return $status; |
| 280 | + if ( $same ) { |
| 281 | + $exists = true; |
| 282 | + } else { |
| 283 | + // Check if the web user exists |
| 284 | + // Connect to the database with the install user |
| 285 | + $status = $this->getPgConnection( 'create-db' ); |
| 286 | + if ( !$status->isOK() ) { |
| 287 | + return $status; |
| 288 | + } |
| 289 | + $exists = $status->value->roleExists( $this->getVar( 'wgDBuser' ) ); |
285 | 290 | } |
286 | | - $exists = $status->value->roleExists( $this->getVar( 'wgDBuser' ) ); |
287 | 291 | |
288 | 292 | // Validate the create checkbox |
289 | 293 | if ( $this->canCreateAccounts() && !$same && !$exists ) { |
— | — | @@ -317,7 +321,7 @@ |
318 | 322 | // The web user is conventionally the table owner in PostgreSQL |
319 | 323 | // installations. Make sure the install user is able to create |
320 | 324 | // objects on behalf of the web user. |
321 | | - if ( $this->canCreateObjectsForWebUser() ) { |
| 325 | + if ( $same || $this->canCreateObjectsForWebUser() ) { |
322 | 326 | return Status::newGood(); |
323 | 327 | } else { |
324 | 328 | return Status::newFatal( 'config-pg-not-in-role' ); |