Better fix for install on distant server
This commit is contained in:
parent
c16489a3c0
commit
45028de51f
@ -541,16 +541,20 @@ if (! $error && $db->connected && $action == "set")
|
|||||||
{
|
{
|
||||||
if ($db->connected)
|
if ($db->connected)
|
||||||
{
|
{
|
||||||
|
$resultbis = 1;
|
||||||
|
|
||||||
// Create user
|
// Create user
|
||||||
$tmpdolibarr_main_db_host = $dolibarr_main_db_host;
|
$result=$db->DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name);
|
||||||
|
// Create user bis
|
||||||
if ($databasefortest == 'mysql')
|
if ($databasefortest == 'mysql')
|
||||||
{
|
{
|
||||||
if (! in_array($conf->db->host, array('127.0.0.1', 'localhost', 'localhost.local'))) $tmpdolibarr_main_db_host='%';
|
if (! in_array($dolibarr_main_db_host, array('127.0.0.1', '::1', 'localhost', 'localhost.local')))
|
||||||
|
{
|
||||||
|
$resultbis=$db->DDLCreateUser('%', $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result=$db->DDLCreateUser($tmpdolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name);
|
if ($result > 0 && $resultbis > 0)
|
||||||
|
|
||||||
if ($result > 0)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user