From 45eda7f54ebaabf17c722db15db3f098c3a48be3 Mon Sep 17 00:00:00 2001 From: seek3r Date: Fri, 1 Jun 2001 09:53:42 +0000 Subject: [PATCH] added what i think is working code to create the pgsql database --- phpgwapi/inc/class.db_pgsql.inc.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/phpgwapi/inc/class.db_pgsql.inc.php b/phpgwapi/inc/class.db_pgsql.inc.php index 248e96cce9..3fb1944a31 100644 --- a/phpgwapi/inc/class.db_pgsql.inc.php +++ b/phpgwapi/inc/class.db_pgsql.inc.php @@ -331,12 +331,15 @@ class db { { $this->User = $adminname; $this->Password = $adminpasswd; - $this->Database = "mysql"; } - $this->disconnect(); - $this->query("CREATE DATABASE $currentDatabase"); - $this->query("grant all on $currentDatabase.* to $currentUser@localhost identified by '$currentPassword'"); - $this->disconnect(); + + system("createdb -h ".$this->Host." ". $currentDatabase, $outval); + if($outval != 0) + { + /* either the rights r not available or the postmaster is not running .... */ + echo 'database creation faliure
'; + echo 'please setup the postreSQL database manually
'; + } $this->User = $currentUser; $this->Password = $currentPassword;