';
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index da28ec88538..1b4badc39b5 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1935,4 +1935,5 @@ AtLeastOneDefaultBankAccountMandatory=At least 1 default bank account must be de
RESTRICT_API_ON_IP=Allow available APIs to some host IP only (wildcard not allowed, use space between values). Empty means every hosts can use the available APIs.
RESTRICT_ON_IP=Allow access to some host IP only (wildcard not allowed, use space between values). Empty means every hosts can access.
BaseOnSabeDavVersion=Based on the library SabreDAV version
-NotAPublicIp=Not a public IP
\ No newline at end of file
+NotAPublicIp=Not a public IP
+MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server (done 1 time only after installation) to allow the foundation to count the number of Dolibarr installation.
\ No newline at end of file
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 375c7e4ea23..620a4b4e7f6 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -2205,7 +2205,7 @@ if (! function_exists("llxFooter"))
*/
function llxFooter($comment = '', $zone = 'private', $disabledoutputofmessages = 0)
{
- global $conf, $langs, $user, $object;
+ global $conf, $db, $langs, $user, $object;
global $delayedhtmlcontent;
global $contextpage, $page, $limit;
@@ -2334,65 +2334,62 @@ if (! function_exists("llxFooter"))
// Add code for the asynchronous anonymous first ping (for telemetry)
if (($_SERVER["PHP_SELF"] == DOL_URL_ROOT.'/index.php') || GETPOST('forceping', 'alpha'))
{
+ //print '';
if (empty($conf->global->MAIN_FIRST_PING_OK_DATE)
- || (! empty($conf->file->instance_unique_id) && (md5($conf->file->instance_unique_id) != $conf->global->MAIN_FIRST_PING_OK_ID))
+ || (! empty($conf->file->instance_unique_id) && (md5($conf->file->instance_unique_id) != $conf->global->MAIN_FIRST_PING_OK_ID) && ($conf->global->MAIN_FIRST_PING_OK_ID != 'disabled'))
|| GETPOST('forceping', 'alpha'))
{
- print "\n".''."\n";
- print "\n\n";
- ?>
-
- file->instance_unique_id)]))
+ {
+ print "\n".''."\n";
+ print "\n\n";
+ $hash_unique_id = md5('dolibarr'.$conf->file->instance_unique_id);
+ ?>
+
+ \n";
+ include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
+ dolibarr_set_const($db, 'MAIN_FIRST_PING_OK_DATE', dol_print_date($now, 'dayhourlog', 'gmt'));
+ dolibarr_set_const($db, 'MAIN_FIRST_PING_OK_ID', 'disabled');
+ }
}
}
print "