@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | public function doIndex(): bool |
| 145 | 145 | { |
| 146 | - $x=Config::checkOldConfig(); |
|
| 146 | + $x = Config::checkOldConfig(); |
|
| 147 | 147 | |
| 148 | 148 | dd([ |
| 149 | 149 | $this, |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | $this->conf->db->name = $config->main_db_name; |
| 359 | 359 | $this->conf->db->user = $config->main_db_user; |
| 360 | 360 | $this->conf->db->pass = $config->main_db_pass; |
| 361 | - $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 | + $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); |
|
| 362 | 362 | if ($db->connected && $db->database_selected) { |
| 363 | 363 | $ok = true; |
| 364 | 364 | } |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | */ |
| 544 | 544 | private function getMigrationScript() |
| 545 | 545 | { |
| 546 | - $dir = BASE_PATH . "/../Dolibarr/Modules/Install/mysql/migration/"; // We use mysql migration scripts whatever is database driver |
|
| 546 | + $dir = BASE_PATH . "/../Dolibarr/Modules/Install/mysql/migration/"; // We use mysql migration scripts whatever is database driver |
|
| 547 | 547 | dolibarr_install_syslog("Scan sql files for migration files in " . $dir); |
| 548 | 548 | |
| 549 | 549 | // Get files list of migration file x.y.z-a.b.c.sql into /install/mysql/migration |
@@ -654,7 +654,7 @@ discard block |
||
| 654 | 654 | $this->config->db->user, |
| 655 | 655 | $this->config->db->pass, |
| 656 | 656 | $this->config->db->name, |
| 657 | - (int)$this->config->db->port |
|
| 657 | + (int) $this->config->db->port |
|
| 658 | 658 | ); |
| 659 | 659 | |
| 660 | 660 | dolibarr_install_syslog("Exit " . $ret); |
@@ -733,8 +733,8 @@ discard block |
||
| 733 | 733 | $newuser->admin = 1; |
| 734 | 734 | $newuser->entity = 0; |
| 735 | 735 | |
| 736 | - $conf->global->USER_MAIL_REQUIRED = 0; // Force global option to be sure to create a new user with no email |
|
| 737 | - $conf->global->USER_PASSWORD_GENERATED = ''; // To not use any rule for password validation |
|
| 736 | + $conf->global->USER_MAIL_REQUIRED = 0; // Force global option to be sure to create a new user with no email |
|
| 737 | + $conf->global->USER_PASSWORD_GENERATED = ''; // To not use any rule for password validation |
|
| 738 | 738 | |
| 739 | 739 | $result = $newuser->create($createuser, 1); |
| 740 | 740 | if ($result <= 0) { |
@@ -897,9 +897,9 @@ discard block |
||
| 897 | 897 | // Only works if you are not in safe_mode. / Ne fonctionne que si on est pas en safe_mode. |
| 898 | 898 | |
| 899 | 899 | $err = error_reporting(); |
| 900 | - error_reporting(0); // Disable all errors |
|
| 900 | + error_reporting(0); // Disable all errors |
|
| 901 | 901 | //error_reporting(E_ALL); |
| 902 | - @set_time_limit(1800); // Need 1800 on some very slow OS like Windows 7/64 |
|
| 902 | + @set_time_limit(1800); // Need 1800 on some very slow OS like Windows 7/64 |
|
| 903 | 903 | error_reporting($err); |
| 904 | 904 | |
| 905 | 905 | $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : (empty($argv[1]) ? '' : $argv[1]); |
@@ -1458,7 +1458,7 @@ discard block |
||
| 1458 | 1458 | // Force here a value we need after because master.inc.php is not loaded into step2. |
| 1459 | 1459 | // This code must be similar with the one into main.inc.php |
| 1460 | 1460 | |
| 1461 | - $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 | + $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. |
|
| 1462 | 1462 | |
| 1463 | 1463 | return static::setIcons($checks); |
| 1464 | 1464 | } |
@@ -1514,7 +1514,7 @@ discard block |
||
| 1514 | 1514 | $this->vars->root_user, |
| 1515 | 1515 | $this->vars->root_pass, |
| 1516 | 1516 | 'User an database creation', |
| 1517 | - (int)$this->config->db->port |
|
| 1517 | + (int) $this->config->db->port |
|
| 1518 | 1518 | ); |
| 1519 | 1519 | |
| 1520 | 1520 | if ($this->vars->create_database) { |
@@ -1552,7 +1552,7 @@ discard block |
||
| 1552 | 1552 | $this->config->db->user, |
| 1553 | 1553 | $this->config->db->pass, |
| 1554 | 1554 | $this->config->db->name, |
| 1555 | - (int)$this->config->db->port |
|
| 1555 | + (int) $this->config->db->port |
|
| 1556 | 1556 | ); |
| 1557 | 1557 | |
| 1558 | 1558 | if (!$db->ok) { |
@@ -1787,7 +1787,7 @@ discard block |
||
| 1787 | 1787 | fwrite($fp, '$dolibarr_main_db_host=\'' . dol_escape_php(trim($this->config->db->host), 1) . '\';'); |
| 1788 | 1788 | fwrite($fp, "\n"); |
| 1789 | 1789 | |
| 1790 | - fwrite($fp, '$dolibarr_main_db_port=\'' . ((int)$this->config->db->port) . '\';'); |
|
| 1790 | + fwrite($fp, '$dolibarr_main_db_port=\'' . ((int) $this->config->db->port) . '\';'); |
|
| 1791 | 1791 | fwrite($fp, "\n"); |
| 1792 | 1792 | |
| 1793 | 1793 | fwrite($fp, '$dolibarr_main_db_name=\'' . dol_escape_php(trim($this->config->db->name), 1) . '\';'); |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | print '<tr class="oddeven"><td><label for="logo">' . $form->textwithpicto($langs->trans("Logo"), $tooltiplogo) . '</label></td><td>'; |
| 565 | 565 | print '<div class="centpercent nobordernopadding valignmiddle "><div class="inline-block marginrightonly">'; |
| 566 | 566 | if ($maxmin > 0) { |
| 567 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 567 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 568 | 568 | } |
| 569 | 569 | print '<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="logo" id="logo" accept="image/*">'; |
| 570 | 570 | print '</div>'; |
@@ -606,7 +606,7 @@ discard block |
||
| 606 | 606 | $maxfilesizearray = getMaxFileSizeArray(); |
| 607 | 607 | $maxmin = $maxfilesizearray['maxmin']; |
| 608 | 608 | if ($maxmin > 0) { |
| 609 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 609 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 610 | 610 | } |
| 611 | 611 | print '<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="logo_squarred" id="logo_squarred" accept="image/*">'; |
| 612 | 612 | print '</div>'; |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | trait DbTrait |
| 25 | 25 | { |
| 26 | - public static function connectDb(?stdClass $db=null): bool |
|
| 26 | + public static function connectDb(?stdClass $db = null): bool |
|
| 27 | 27 | { |
| 28 | 28 | if ($db === null) { |
| 29 | 29 | return false; |