Index: trunk/phase3/includes/installer/PostgresInstaller.php |
— | — | @@ -383,6 +383,10 @@ |
384 | 384 | } |
385 | 385 | |
386 | 386 | public function preInstall() { |
| 387 | + $createDbAccount = array( |
| 388 | + 'name' => 'user', |
| 389 | + 'callback' => array( $this, 'setupUser' ), |
| 390 | + ); |
387 | 391 | $commitCB = array( |
388 | 392 | 'name' => 'pg-commit', |
389 | 393 | 'callback' => array( $this, 'commitChanges' ), |
— | — | @@ -395,15 +399,13 @@ |
396 | 400 | 'name' => 'schema', |
397 | 401 | 'callback' => array( $this, 'setupSchema' ) |
398 | 402 | ); |
| 403 | + |
| 404 | + if( $this->getVar( '_CreateDBAccount' ) ) { |
| 405 | + $this->parent->addInstallStep( $createDbAccount, 'database' ); |
| 406 | + } |
399 | 407 | $this->parent->addInstallStep( $commitCB, 'interwiki' ); |
400 | 408 | $this->parent->addInstallStep( $plpgCB, 'database' ); |
401 | 409 | $this->parent->addInstallStep( $schemaCB, 'database' ); |
402 | | - if( $this->getVar( '_CreateDBAccount' ) ) { |
403 | | - $this->parent->addInstallStep( array( |
404 | | - 'name' => 'user', |
405 | | - 'callback' => array( $this, 'setupUser' ), |
406 | | - ) ); |
407 | | - } |
408 | 410 | } |
409 | 411 | |
410 | 412 | function setupDatabase() { |
Index: trunk/phase3/includes/installer/CliInstaller.php |
— | — | @@ -83,6 +83,9 @@ |
84 | 84 | $option['installdbuser'] ); |
85 | 85 | $this->setVar( '_InstallPassword', |
86 | 86 | $option['installdbpass'] ); |
| 87 | + |
| 88 | + // Assume that if we're given the installer user, we'll create the account. |
| 89 | + $this->setVar( '_CreateDBAccount', true ); |
87 | 90 | } |
88 | 91 | |
89 | 92 | if ( isset( $option['pass'] ) ) { |