|
@@ -152,9 +152,9 @@ discard block |
|
|
block discarded – undo |
|
152
|
152
|
// Only works if you are not in safe_mode. / Ne fonctionne que si on est pas en safe_mode. |
|
153
|
153
|
|
|
154
|
154
|
$err = error_reporting(); |
|
155
|
|
- error_reporting(0); // Disable all errors |
|
|
155
|
+ error_reporting(0); // Disable all errors |
|
156
|
156
|
//error_reporting(E_ALL); |
|
157
|
|
- @set_time_limit(1800); // Need 1800 on some very slow OS like Windows 7/64 |
|
|
157
|
+ @set_time_limit(1800); // Need 1800 on some very slow OS like Windows 7/64 |
|
158
|
158
|
error_reporting($err); |
|
159
|
159
|
|
|
160
|
160
|
$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : (empty($argv[1]) ? '' : $argv[1]); |
|
@@ -220,7 +220,7 @@ discard block |
|
|
block discarded – undo |
|
220
|
220
|
print '<table cellspacing="0" style="padding: 4px 4px 4px 0" border="0" width="100%">'; |
|
221
|
221
|
$error = 0; |
|
222
|
222
|
|
|
223
|
|
- $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, (int)$conf->db->port); |
|
|
223
|
+ $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, (int) $conf->db->port); |
|
224
|
224
|
|
|
225
|
225
|
if ($db->connected) { |
|
226
|
226
|
print "<tr><td>"; |
|
@@ -704,7 +704,7 @@ discard block |
|
|
block discarded – undo |
|
704
|
704
|
|
|
705
|
705
|
$this->conf->file->instance_unique_id = (empty($conf->main_instance_unique_id) ? (empty($dolibarr_main_cookie_cryptkey) ? '' : $dolibarr_main_cookie_cryptkey) : $conf->main_instance_unique_id); // Unique id of instance |
|
706
|
706
|
|
|
707
|
|
- $hash_unique_id = Security::dol_hash('dolibarr' . $this->conf->file->instance_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. |
|
|
707
|
+ $hash_unique_id = Security::dol_hash('dolibarr' . $this->conf->file->instance_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. |
|
708
|
708
|
|
|
709
|
709
|
$out = '<input type="checkbox" name="dolibarrpingno" id="dolibarrpingno"' . ((getDolGlobalString('MAIN_FIRST_PING_OK_ID') == 'disabled') ? '' : ' value="checked" checked="true"') . '> '; |
|
710
|
710
|
$out .= '<label for="dolibarrpingno">' . $this->langs->trans("MakeAnonymousPing") . '</label>'; |
|
@@ -1166,7 +1166,7 @@ discard block |
|
|
block discarded – undo |
|
1166
|
1166
|
$this->conf->db->name = $config->main_db_name; |
|
1167
|
1167
|
$this->conf->db->user = $config->main_db_user; |
|
1168
|
1168
|
$this->conf->db->pass = $config->main_db_pass; |
|
1169
|
|
- $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); |
|
|
1169
|
+ $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); |
|
1170
|
1170
|
if ($db->connected && $db->database_selected) { |
|
1171
|
1171
|
$ok = true; |
|
1172
|
1172
|
} |
|
@@ -1345,7 +1345,7 @@ discard block |
|
|
block discarded – undo |
|
1345
|
1345
|
|
|
1346
|
1346
|
private function getMigrationScript() |
|
1347
|
1347
|
{ |
|
1348
|
|
- $dir = BASE_PATH . "/../Dolibarr/Modules/Install/mysql/migration/"; // We use mysql migration scripts whatever is database driver |
|
|
1348
|
+ $dir = BASE_PATH . "/../Dolibarr/Modules/Install/mysql/migration/"; // We use mysql migration scripts whatever is database driver |
|
1349
|
1349
|
dolibarr_install_syslog("Scan sql files for migration files in " . $dir); |
|
1350
|
1350
|
|
|
1351
|
1351
|
// Get files list of migration file x.y.z-a.b.c.sql into /install/mysql/migration |
|
@@ -1426,7 +1426,7 @@ discard block |
|
|
block discarded – undo |
|
1426
|
1426
|
$db_user, |
|
1427
|
1427
|
$db_pass, |
|
1428
|
1428
|
'User an database creation', |
|
1429
|
|
- (int)$this->config->db->port |
|
|
1429
|
+ (int) $this->config->db->port |
|
1430
|
1430
|
); |
|
1431
|
1431
|
|
|
1432
|
1432
|
if ($this->db_create_database) { |
|
@@ -1464,7 +1464,7 @@ discard block |
|
|
block discarded – undo |
|
1464
|
1464
|
$this->config->db->user, |
|
1465
|
1465
|
$this->config->db->pass, |
|
1466
|
1466
|
$this->config->db->name, |
|
1467
|
|
- (int)$this->config->db->port |
|
|
1467
|
+ (int) $this->config->db->port |
|
1468
|
1468
|
); |
|
1469
|
1469
|
|
|
1470
|
1470
|
if (!$db->ok) { |
|
@@ -1652,7 +1652,7 @@ discard block |
|
|
block discarded – undo |
|
1652
|
1652
|
|
|
1653
|
1653
|
// Check database connection |
|
1654
|
1654
|
|
|
1655
|
|
- $db = getDoliDBInstance($this->conf->db->type, $this->conf->db->host, $userroot, $passroot, $databasefortest, (int)$this->conf->db->port); |
|
|
1655
|
+ $db = getDoliDBInstance($this->conf->db->type, $this->conf->db->host, $userroot, $passroot, $databasefortest, (int) $this->conf->db->port); |
|
1656
|
1656
|
|
|
1657
|
1657
|
if ($db->error) { |
|
1658
|
1658
|
print '<div class="error">' . $db->error . '</div>'; |
|
@@ -1736,7 +1736,7 @@ discard block |
|
|
block discarded – undo |
|
1736
|
1736
|
// If database creation was asked, we create it |
|
1737
|
1737
|
if (!$error && (isset($this->db_create_database) && ($this->db_create_database == "1" || $this->db_create_database == "on"))) { |
|
1738
|
1738
|
dolibarr_install_syslog("step1: create database: " . $dolibarr_main_db_name . " " . $dolibarr_main_db_character_set . " " . $dolibarr_main_db_collation . " " . $dolibarr_main_db_user); |
|
1739
|
|
- $newdb = getDoliDBInstance($this->conf->db->type, $this->conf->db->host, $userroot, $passroot, '', (int)$this->conf->db->port); |
|
|
1739
|
+ $newdb = getDoliDBInstance($this->conf->db->type, $this->conf->db->host, $userroot, $passroot, '', (int) $this->conf->db->port); |
|
1740
|
1740
|
//print 'eee'.$this->conf->db->type." ".$this->conf->db->host." ".$userroot." ".$passroot." ".$this->conf->db->port." ".$newdb->connected." ".$newdb->forcecharset;exit; |
|
1741
|
1741
|
|
|
1742
|
1742
|
if ($newdb->connected) { |
|
@@ -1796,7 +1796,7 @@ discard block |
|
|
block discarded – undo |
|
1796
|
1796
|
dolibarr_install_syslog("step1: connection type=" . $this->conf->db->type . " on host=" . $this->conf->db->host . " port=" . $this->conf->db->port . " user=" . $this->conf->db->user . " name=" . $this->conf->db->name); |
|
1797
|
1797
|
//print "connection de type=".$this->conf->db->type." sur host=".$this->conf->db->host." port=".$this->conf->db->port." user=".$this->conf->db->user." name=".$this->conf->db->name; |
|
1798
|
1798
|
|
|
1799
|
|
- $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); |
|
|
1799
|
+ $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); |
|
1800
|
1800
|
|
|
1801
|
1801
|
if ($db->connected) { |
|
1802
|
1802
|
dolibarr_install_syslog("step1: connection to server by user " . $this->conf->db->user . " ok"); |
|
@@ -1922,7 +1922,7 @@ discard block |
|
|
block discarded – undo |
|
1922
|
1922
|
fwrite($fp, '$dolibarr_main_db_host=\'' . dol_escape_php(trim($this->db_host), 1) . '\';'); |
|
1923
|
1923
|
fwrite($fp, "\n"); |
|
1924
|
1924
|
|
|
1925
|
|
- fwrite($fp, '$dolibarr_main_db_port=\'' . ((int)$this->db_port) . '\';'); |
|
|
1925
|
+ fwrite($fp, '$dolibarr_main_db_port=\'' . ((int) $this->db_port) . '\';'); |
|
1926
|
1926
|
fwrite($fp, "\n"); |
|
1927
|
1927
|
|
|
1928
|
1928
|
fwrite($fp, '$dolibarr_main_db_name=\'' . dol_escape_php(trim($this->db_name), 1) . '\';'); |