FIX If mysql server is distant, the creation of user must use % as host
with mysql.
This commit is contained in:
parent
dcb14db10d
commit
1e1028605d
@ -810,7 +810,7 @@ class DoliDBMysqli extends DoliDB
|
|||||||
/**
|
/**
|
||||||
* Create a user and privileges to connect to database (even if database does not exists yet)
|
* Create a user and privileges to connect to database (even if database does not exists yet)
|
||||||
*
|
*
|
||||||
* @param string $dolibarr_main_db_host Ip serveur
|
* @param string $dolibarr_main_db_host Ip server or '%'
|
||||||
* @param string $dolibarr_main_db_user Nom user a creer
|
* @param string $dolibarr_main_db_user Nom user a creer
|
||||||
* @param string $dolibarr_main_db_pass Mot de passe user a creer
|
* @param string $dolibarr_main_db_pass Mot de passe user a creer
|
||||||
* @param string $dolibarr_main_db_name Database name where user must be granted
|
* @param string $dolibarr_main_db_name Database name where user must be granted
|
||||||
|
|||||||
@ -15,55 +15,31 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.minwidth100 { min-width: 100px; }
|
|
||||||
.minwidth200 { min-width: 200px; }
|
|
||||||
.minwidth300 { min-width: 300px; }
|
|
||||||
.minwidth400 { min-width: 400px; }
|
|
||||||
.minwidth500 { min-width: 500px; }
|
|
||||||
.minwidth50imp { min-width: 50px !important; }
|
|
||||||
.minwidth100imp { min-width: 100px !important; }
|
|
||||||
.minwidth200imp { min-width: 200px !important; }
|
|
||||||
.minwidth300imp { min-width: 300px !important; }
|
|
||||||
.minwidth400imp { min-width: 400px !important; }
|
|
||||||
.minwidth500imp { min-width: 500px !important; }
|
|
||||||
|
|
||||||
/* Force values for small screen 570 */
|
|
||||||
@media only screen and (max-width: 570px)
|
|
||||||
{
|
|
||||||
input, input[type=text], input[type=password], select, textarea {
|
|
||||||
min-width: 20px;
|
|
||||||
min-height: 1.4em;
|
|
||||||
line-height: 1.4em;
|
|
||||||
padding: .4em .1em;
|
|
||||||
border: 1px solid #BBB;
|
|
||||||
/* max-width: inherit; why this ? */
|
|
||||||
}
|
|
||||||
|
|
||||||
.hideonsmartphone { display: none; }
|
|
||||||
.noenlargeonsmartphone { width : 50px !important; display: inline !important; }
|
|
||||||
.maxwidthonsmartphone { max-width: 100px; }
|
|
||||||
.maxwidth50onsmartphone { max-width: 40px; }
|
|
||||||
.maxwidth75onsmartphone { max-width: 50px; }
|
|
||||||
.maxwidth100onsmartphone { max-width: 70px; }
|
|
||||||
.maxwidth150onsmartphone { max-width: 120px; }
|
|
||||||
.maxwidth200onsmartphone { max-width: 200px; }
|
|
||||||
.maxwidth300onsmartphone { max-width: 300px; }
|
|
||||||
.maxwidth400onsmartphone { max-width: 400px; }
|
|
||||||
.minwidth50imp { min-width: 50px !important; }
|
|
||||||
.minwidth100imp { min-width: 50px !important; }
|
|
||||||
.minwidth200imp { min-width: 50px !important; }
|
|
||||||
.minwidth300imp { min-width: 50px !important; }
|
|
||||||
.minwidth400imp { min-width: 50px !important; }
|
|
||||||
.minwidth500imp { min-width: 50px !important; }
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-size:13px;
|
font-size:14px;
|
||||||
font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
|
font-family: roboto,arial,tahoma,verdana,helvetica;
|
||||||
background: #fcfcfc;
|
/* background: #fcfcfc; */
|
||||||
margin: 15px 30px 10px;
|
margin: 15px 30px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.main-inside {
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
margin-top: 10px;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.main {
|
||||||
|
padding-left: 6px;
|
||||||
|
padding-right: 6px;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
div.titre {
|
div.titre {
|
||||||
padding: 5px 5px 5px 5px;
|
padding: 5px 5px 5px 5px;
|
||||||
margin: 0 0 0 0;
|
margin: 0 0 0 0;
|
||||||
@ -90,6 +66,74 @@ div.soustitre {
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.minwidth100 { min-width: 100px; }
|
||||||
|
.minwidth200 { min-width: 200px; }
|
||||||
|
.minwidth300 { min-width: 300px; }
|
||||||
|
.minwidth400 { min-width: 400px; }
|
||||||
|
.minwidth500 { min-width: 500px; }
|
||||||
|
.minwidth50imp { min-width: 50px !important; }
|
||||||
|
.minwidth100imp { min-width: 100px !important; }
|
||||||
|
.minwidth200imp { min-width: 200px !important; }
|
||||||
|
.minwidth300imp { min-width: 300px !important; }
|
||||||
|
.minwidth400imp { min-width: 400px !important; }
|
||||||
|
.minwidth500imp { min-width: 500px !important; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Force values for small screen 570 */
|
||||||
|
@media only screen and (max-width: 570px)
|
||||||
|
{
|
||||||
|
body {
|
||||||
|
margin: 15px 4px 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input, input[type=text], input[type=password], select, textarea {
|
||||||
|
min-width: 20px;
|
||||||
|
min-height: 1.4em;
|
||||||
|
line-height: 1.4em;
|
||||||
|
padding: .4em .1em;
|
||||||
|
border: 1px solid #BBB;
|
||||||
|
/* max-width: inherit; why this ? */
|
||||||
|
}
|
||||||
|
|
||||||
|
.hideonsmartphone { display: none; }
|
||||||
|
.noenlargeonsmartphone { width : 50px !important; display: inline !important; }
|
||||||
|
.maxwidthonsmartphone { max-width: 100px; }
|
||||||
|
.maxwidth50onsmartphone { max-width: 40px; }
|
||||||
|
.maxwidth75onsmartphone { max-width: 50px; }
|
||||||
|
.maxwidth100onsmartphone { max-width: 70px; }
|
||||||
|
.maxwidth150onsmartphone { max-width: 120px; }
|
||||||
|
.maxwidth200onsmartphone { max-width: 200px; }
|
||||||
|
.maxwidth300onsmartphone { max-width: 300px; }
|
||||||
|
.maxwidth400onsmartphone { max-width: 400px; }
|
||||||
|
.minwidth50imp { min-width: 50px !important; }
|
||||||
|
.minwidth100imp { min-width: 50px !important; }
|
||||||
|
.minwidth200imp { min-width: 50px !important; }
|
||||||
|
.minwidth300imp { min-width: 50px !important; }
|
||||||
|
.minwidth400imp { min-width: 50px !important; }
|
||||||
|
.minwidth500imp { min-width: 50px !important; }
|
||||||
|
|
||||||
|
table.main {
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.main-inside {
|
||||||
|
padding-left: 1px;
|
||||||
|
padding-right: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.titre {
|
||||||
|
font-size: 90%;
|
||||||
|
font-weight: normal;
|
||||||
|
background: #FFFFFF;
|
||||||
|
color: #444;
|
||||||
|
border: 1px solid #999;
|
||||||
|
padding: 5px 5px 5px 5px;
|
||||||
|
margin: 0 0 0 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
input:disabled
|
input:disabled
|
||||||
{
|
{
|
||||||
background: #FDFDFD;
|
background: #FDFDFD;
|
||||||
@ -150,33 +194,12 @@ input:-webkit-autofill {
|
|||||||
-webkit-box-shadow: 0 0 0 50px #FBFFEA inset;
|
-webkit-box-shadow: 0 0 0 50px #FBFFEA inset;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.main {
|
|
||||||
padding-left: 6px;
|
|
||||||
padding-right: 6px;
|
|
||||||
padding-top: 12px;
|
|
||||||
padding-bottom: 12px;
|
|
||||||
border: 1px solid #A0A0A0;
|
|
||||||
border-radius: 8px;
|
|
||||||
border: solid 1px rgba(90,90,90,.4);
|
|
||||||
background-color: #fff;
|
|
||||||
-moz-box-shadow: 0px 1px 6px 2px rgba(0, 0, 0, 0.2);
|
|
||||||
-webkit-box-shadow: 0px 1px 6px 2px rgba(0, 0, 0, 0.2);
|
|
||||||
box-shadow: 0px 1px 6px 2px rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
table.main-inside {
|
|
||||||
padding-left: 10px;
|
|
||||||
padding-right: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
margin-top: 10px;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.listofchoices, tr.listofchoices, td.listofchoices {
|
table.listofchoices, tr.listofchoices, td.listofchoices {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
border: 1px solid #999 !important;
|
border: 1px solid #ccc !important;
|
||||||
|
line-height: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.listofchoices {
|
tr.listofchoices {
|
||||||
@ -257,7 +280,6 @@ a.titre {
|
|||||||
div.comment {
|
div.comment {
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
color:black;
|
color:black;
|
||||||
font-size: 13px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
@ -293,9 +315,6 @@ td.comment {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
border-bottom: 1px solid #CCCCDB;
|
border-bottom: 1px solid #CCCCDB;
|
||||||
}
|
}
|
||||||
table {
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.install
|
.install
|
||||||
{
|
{
|
||||||
@ -319,8 +338,8 @@ ul {
|
|||||||
|
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
background: #FFFFFF bottom;
|
background: #eee;
|
||||||
border: 1px solid #C0C0C0;
|
/*border: 1px solid #C0C0C0;*/
|
||||||
padding: 0.3em 0.7em;
|
padding: 0.3em 0.7em;
|
||||||
margin: 0 0.5em;
|
margin: 0 0.5em;
|
||||||
-moz-border-radius:0 5px 0 5px;
|
-moz-border-radius:0 5px 0 5px;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
@ -129,7 +129,6 @@ if (@file_exists($forcedfile)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dolibarr_install_syslog("--- step1: entering step1.php page");
|
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
@ -138,6 +137,7 @@ $error = 0;
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
dolibarr_install_syslog("--- step1: entering step1.php page");
|
||||||
|
|
||||||
pHeader($langs->trans("ConfigurationFile"),"step2");
|
pHeader($langs->trans("ConfigurationFile"),"step2");
|
||||||
|
|
||||||
@ -541,7 +541,14 @@ if (! $error && $db->connected && $action == "set")
|
|||||||
{
|
{
|
||||||
if ($db->connected)
|
if ($db->connected)
|
||||||
{
|
{
|
||||||
$result=$db->DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name);
|
// Create user
|
||||||
|
$tmpdolibarr_main_db_host = $dolibarr_main_db_host;
|
||||||
|
if ($databasefortest == 'mysql')
|
||||||
|
{
|
||||||
|
if (! in_array($conf->db->host, array('127.0.0.1', 'localhost', 'localhost.local'))) $tmpdolibarr_main_db_host='%';
|
||||||
|
}
|
||||||
|
|
||||||
|
$result=$db->DDLCreateUser($tmpdolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name);
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user