$option['installdbuser'] );
$this->setVar( '_InstallPassword',
$option['installdbpass'] );
+
+ // Assume that if we're given the installer user, we'll create the account.
+ $this->setVar( '_CreateDBAccount', true );
}
if ( isset( $option['pass'] ) ) {
}
public function preInstall() {
+ $createDbAccount = array(
+ 'name' => 'user',
+ 'callback' => array( $this, 'setupUser' ),
+ );
$commitCB = array(
'name' => 'pg-commit',
'callback' => array( $this, 'commitChanges' ),
'name' => 'schema',
'callback' => array( $this, 'setupSchema' )
);
+
+ if( $this->getVar( '_CreateDBAccount' ) ) {
+ $this->parent->addInstallStep( $createDbAccount, 'database' );
+ }
$this->parent->addInstallStep( $commitCB, 'interwiki' );
$this->parent->addInstallStep( $plpgCB, 'database' );
$this->parent->addInstallStep( $schemaCB, 'database' );
- if( $this->getVar( '_CreateDBAccount' ) ) {
- $this->parent->addInstallStep( array(
- 'name' => 'user',
- 'callback' => array( $this, 'setupUser' ),
- ) );
- }
}
function setupDatabase() {