This commit is contained in:
Chad Horohoe 2011-02-03 20:40:20 +00:00
parent aa27fb37be
commit 6e35fc91a1
2 changed files with 9 additions and 7 deletions

View file

@ -449,6 +449,7 @@ Make sure that the user "$1" can write to the schema "$2".',
'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',

View file

@ -24,7 +24,7 @@ class PostgresInstaller extends DatabaseInstaller {
);
var $minimumVersion = '8.3';
var $useAdmin = FALSE;
private $useAdmin = false;
function getName() {
return 'postgres';
@ -70,7 +70,7 @@ class PostgresInstaller extends DatabaseInstaller {
return $status;
}
$this->useAdmin = TRUE;
$this->useAdmin = true;
// Try to connect
$status->merge( $this->getConnection() );
if ( !$status->isOK() ) {
@ -78,7 +78,9 @@ class PostgresInstaller extends DatabaseInstaller {
}
//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;
}
@ -118,7 +120,7 @@ class PostgresInstaller extends DatabaseInstaller {
}
protected function canCreateAccounts() {
$this->useAdmin = TRUE;
$this->useAdmin = true;
$status = $this->getConnection();
if ( !$status->isOK() ) {
return false;
@ -324,10 +326,9 @@ class PostgresInstaller extends DatabaseInstaller {
}
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;
}