Use of MAIN_FIRST_PING_OK_ID = 'disabled' works when forcing reinstall.

This commit is contained in:
Laurent Destailleur 2021-10-24 14:01:23 +02:00
parent d3f630e4b5
commit ad3297b0ef
2 changed files with 2 additions and 2 deletions

View File

@ -571,7 +571,7 @@ dolibarr_install_syslog("Exit ".$ret);
dolibarr_install_syslog("- step2: end");
$out = '<input type="checkbox" name="dolibarrpingno" id="dolibarrpingno" value="checked" checked="true"> ';
$out = '<input type="checkbox" name="dolibarrpingno" id="dolibarrpingno"'.((!empty($conf->global->MAIN_FIRST_PING_OK_ID) && $conf->global->MAIN_FIRST_PING_OK_ID == 'disabled') ? '' : ' value="checked" checked="true"').'> ';
$out .= '<label for="dolibarrpingno">'.$langs->trans("MakeAnonymousPing").'</label>';
$out .= '<!-- Add js script to manage the uncheck of option to not send the ping -->';

View File

@ -3214,7 +3214,7 @@ if (!function_exists("llxFooter")) {
print "\n<!-- NO JS CODE TO ENABLE the anonymous Ping. It is an alpha version -->\n";
} elseif (empty($_COOKIE['DOLINSTALLNOPING_'.$hash_unique_id]) || $forceping) { // Cookie is set when we uncheck the checkbox in the installation wizard.
// MAIN_LAST_PING_KO_DATE
// Disable ping if MAIN_LAST_PING_KO_DATE is set and is recent
// Disable ping if MAIN_LAST_PING_KO_DATE is set and is recent (this month)
if (!empty($conf->global->MAIN_LAST_PING_KO_DATE) && substr($conf->global->MAIN_LAST_PING_KO_DATE, 0, 6) == dol_print_date(dol_now(), '%Y%m') && !$forceping) {
print "\n<!-- NO JS CODE TO ENABLE the anonymous Ping. An error already occured this month, we will try later. -->\n";
} else {