Possiable fix for databases not being created when the user doesn't specify a host

This commit is contained in:
jengo 2001-06-03 23:50:50 +00:00
parent 96293091d6
commit ebc976dbdb

View File

@ -333,7 +333,15 @@ class db {
$this->Password = $adminpasswd;
}
system("createdb -h ".$this->Host." ". $currentDatabase, $outval);
if (! $this->Host)
{
system('createdb ' . $currentDatabase, $outval);
}
else
{
system('createdb -h ' . $this->Host . ' ' . $currentDatabase, $outval);
}
if($outval != 0)
{
/* either the rights r not available or the postmaster is not running .... */