'config-install-pg-commit' => 'Committing changes',
'config-install-pg-plpgsql' => 'Checking for language PL/pgSQL',
'config-pg-no-plpgsql' => 'You need to install the language PL/pgSQL in the database $1',
+ 'config-pg-no-create-privs' => 'The account you specified for installation does not have enough privileges to create an account.',
'config-install-user' => 'Creating database user',
'config-install-user-failed' => 'Granting permission to user "$1" failed: $2',
'config-install-tables' => 'Creating tables',
);
var $minimumVersion = '8.3';
- var $useAdmin = FALSE;
+ private $useAdmin = false;
function getName() {
return 'postgres';
return $status;
}
- $this->useAdmin = TRUE;
+ $this->useAdmin = true;
// Try to connect
$status->merge( $this->getConnection() );
if ( !$status->isOK() ) {
}
//Make sure install user can create
- $status->merge( $this->canCreateAccounts() );
+ if( !$this->canCreateAccounts() ) {
+ $status->fatal( 'config-pg-no-create-privs' );
+ }
if ( !$status->isOK() ) {
return $status;
}
}
protected function canCreateAccounts() {
- $this->useAdmin = TRUE;
+ $this->useAdmin = true;
$status = $this->getConnection();
if ( !$status->isOK() ) {
return false;
}
public function createTables() {
- $this->db = NULL;
- $this->useAdmin = FALSE;
+ $this->db = null;
+ $this->useAdmin = false;
$status = $this->getConnection();
- var_export($status);
if ( !$status->isOK() ) {
return $status;
}