mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-11 00:18:25 +01:00
added what i think is working code to create the pgsql database
This commit is contained in:
parent
777aa59e10
commit
45eda7f54e
@ -331,12 +331,15 @@ class db {
|
|||||||
{
|
{
|
||||||
$this->User = $adminname;
|
$this->User = $adminname;
|
||||||
$this->Password = $adminpasswd;
|
$this->Password = $adminpasswd;
|
||||||
$this->Database = "mysql";
|
|
||||||
}
|
}
|
||||||
$this->disconnect();
|
|
||||||
$this->query("CREATE DATABASE $currentDatabase");
|
system("createdb -h ".$this->Host." ". $currentDatabase, $outval);
|
||||||
$this->query("grant all on $currentDatabase.* to $currentUser@localhost identified by '$currentPassword'");
|
if($outval != 0)
|
||||||
$this->disconnect();
|
{
|
||||||
|
/* either the rights r not available or the postmaster is not running .... */
|
||||||
|
echo 'database creation faliure <BR>';
|
||||||
|
echo 'please setup the postreSQL database manually<BR>';
|
||||||
|
}
|
||||||
|
|
||||||
$this->User = $currentUser;
|
$this->User = $currentUser;
|
||||||
$this->Password = $currentPassword;
|
$this->Password = $currentPassword;
|
||||||
|
Loading…
Reference in New Issue
Block a user