|
@@ -357,7 +357,7 @@ discard block |
|
|
block discarded – undo |
|
357
|
357
|
$this->conf->db->name = $config->main_db_name; |
|
358
|
358
|
$this->conf->db->user = $config->main_db_user; |
|
359
|
359
|
$this->conf->db->pass = $config->main_db_pass; |
|
360
|
|
- $db = getDoliDBInstance($this->conf->db->type, $this->conf->db->host, $this->conf->db->user, $this->conf->db->pass, $this->conf->db->name, (int)$this->conf->db->port); |
|
|
360
|
+ $db = getDoliDBInstance($this->conf->db->type, $this->conf->db->host, $this->conf->db->user, $this->conf->db->pass, $this->conf->db->name, (int) $this->conf->db->port); |
|
361
|
361
|
if ($db->connected && $db->database_selected) { |
|
362
|
362
|
$ok = true; |
|
363
|
363
|
} |
|
@@ -542,7 +542,7 @@ discard block |
|
|
block discarded – undo |
|
542
|
542
|
*/ |
|
543
|
543
|
private function getMigrationScript() |
|
544
|
544
|
{ |
|
545
|
|
- $dir = BASE_PATH . "/../Dolibarr/Modules/Install/mysql/migration/"; // We use mysql migration scripts whatever is database driver |
|
|
545
|
+ $dir = BASE_PATH . "/../Dolibarr/Modules/Install/mysql/migration/"; // We use mysql migration scripts whatever is database driver |
|
546
|
546
|
dolibarr_install_syslog("Scan sql files for migration files in " . $dir); |
|
547
|
547
|
|
|
548
|
548
|
// Get files list of migration file x.y.z-a.b.c.sql into /install/mysql/migration |
|
@@ -653,7 +653,7 @@ discard block |
|
|
block discarded – undo |
|
653
|
653
|
$this->config->db->user, |
|
654
|
654
|
$this->config->db->pass, |
|
655
|
655
|
$this->config->db->name, |
|
656
|
|
- (int)$this->config->db->port |
|
|
656
|
+ (int) $this->config->db->port |
|
657
|
657
|
); |
|
658
|
658
|
|
|
659
|
659
|
dolibarr_install_syslog("Exit " . $ret); |
|
@@ -732,8 +732,8 @@ discard block |
|
|
block discarded – undo |
|
732
|
732
|
$newuser->admin = 1; |
|
733
|
733
|
$newuser->entity = 0; |
|
734
|
734
|
|
|
735
|
|
- $conf->global->USER_MAIL_REQUIRED = 0; // Force global option to be sure to create a new user with no email |
|
736
|
|
- $conf->global->USER_PASSWORD_GENERATED = ''; // To not use any rule for password validation |
|
|
735
|
+ $conf->global->USER_MAIL_REQUIRED = 0; // Force global option to be sure to create a new user with no email |
|
|
736
|
+ $conf->global->USER_PASSWORD_GENERATED = ''; // To not use any rule for password validation |
|
737
|
737
|
|
|
738
|
738
|
$result = $newuser->create($createuser, 1); |
|
739
|
739
|
if ($result <= 0) { |
|
@@ -896,9 +896,9 @@ discard block |
|
|
block discarded – undo |
|
896
|
896
|
// Only works if you are not in safe_mode. / Ne fonctionne que si on est pas en safe_mode. |
|
897
|
897
|
|
|
898
|
898
|
$err = error_reporting(); |
|
899
|
|
- error_reporting(0); // Disable all errors |
|
|
899
|
+ error_reporting(0); // Disable all errors |
|
900
|
900
|
//error_reporting(E_ALL); |
|
901
|
|
- @set_time_limit(1800); // Need 1800 on some very slow OS like Windows 7/64 |
|
|
901
|
+ @set_time_limit(1800); // Need 1800 on some very slow OS like Windows 7/64 |
|
902
|
902
|
error_reporting($err); |
|
903
|
903
|
|
|
904
|
904
|
$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : (empty($argv[1]) ? '' : $argv[1]); |
|
@@ -1457,7 +1457,7 @@ discard block |
|
|
block discarded – undo |
|
1457
|
1457
|
// Force here a value we need after because master.inc.php is not loaded into step2. |
|
1458
|
1458
|
// This code must be similar with the one into main.inc.php |
|
1459
|
1459
|
|
|
1460
|
|
- $this->vars->hash_unique_id = dol_hash('dolibarr' . $this->config->main->unique_id, 'sha256'); // Note: if the global salt changes, this hash changes too so ping may be counted twice. We don't mind. It is for statistics purpose only. |
|
|
1460
|
+ $this->vars->hash_unique_id = dol_hash('dolibarr' . $this->config->main->unique_id, 'sha256'); // Note: if the global salt changes, this hash changes too so ping may be counted twice. We don't mind. It is for statistics purpose only. |
|
1461
|
1461
|
|
|
1462
|
1462
|
return static::setIcons($checks); |
|
1463
|
1463
|
} |
|
@@ -1513,7 +1513,7 @@ discard block |
|
|
block discarded – undo |
|
1513
|
1513
|
$this->vars->root_user, |
|
1514
|
1514
|
$this->vars->root_pass, |
|
1515
|
1515
|
'User an database creation', |
|
1516
|
|
- (int)$this->config->db->port |
|
|
1516
|
+ (int) $this->config->db->port |
|
1517
|
1517
|
); |
|
1518
|
1518
|
|
|
1519
|
1519
|
if ($this->vars->create_database) { |
|
@@ -1551,7 +1551,7 @@ discard block |
|
|
block discarded – undo |
|
1551
|
1551
|
$this->config->db->user, |
|
1552
|
1552
|
$this->config->db->pass, |
|
1553
|
1553
|
$this->config->db->name, |
|
1554
|
|
- (int)$this->config->db->port |
|
|
1554
|
+ (int) $this->config->db->port |
|
1555
|
1555
|
); |
|
1556
|
1556
|
|
|
1557
|
1557
|
if (!$db->ok) { |
|
@@ -1786,7 +1786,7 @@ discard block |
|
|
block discarded – undo |
|
1786
|
1786
|
fwrite($fp, '$dolibarr_main_db_host=\'' . dol_escape_php(trim($this->config->db->host), 1) . '\';'); |
|
1787
|
1787
|
fwrite($fp, "\n"); |
|
1788
|
1788
|
|
|
1789
|
|
- fwrite($fp, '$dolibarr_main_db_port=\'' . ((int)$this->config->db->port) . '\';'); |
|
|
1789
|
+ fwrite($fp, '$dolibarr_main_db_port=\'' . ((int) $this->config->db->port) . '\';'); |
|
1790
|
1790
|
fwrite($fp, "\n"); |
|
1791
|
1791
|
|
|
1792
|
1792
|
fwrite($fp, '$dolibarr_main_db_name=\'' . dol_escape_php(trim($this->config->db->name), 1) . '\';'); |