mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
FIX avoid php8 warning with multicompany
This commit is contained in:
@@ -67,14 +67,14 @@ print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"])
|
||||
if ($action == 'firstpingok') {
|
||||
// Note: pings are per installed instances / entity.
|
||||
// Once this constants are set, no more ping will be tried (except if we add parameter &forceping=1 on URL). So we can say this are 'first' ping.
|
||||
dolibarr_set_const($db, 'MAIN_FIRST_PING_OK_DATE', dol_print_date($now, 'dayhourlog', 'gmt'));
|
||||
dolibarr_set_const($db, 'MAIN_FIRST_PING_OK_ID', $hash_unique_id);
|
||||
dolibarr_set_const($db, 'MAIN_FIRST_PING_OK_DATE', dol_print_date($now, 'dayhourlog', 'gmt'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, 'MAIN_FIRST_PING_OK_ID', $hash_unique_id, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
print 'First ping OK saved for entity '.$conf->entity;
|
||||
} elseif ($action == 'firstpingko') {
|
||||
// If ko
|
||||
// Note: pings are by installation, done on entity 1.
|
||||
dolibarr_set_const($db, 'MAIN_LAST_PING_KO_DATE', dol_print_date($now, 'dayhourlog'), 'gmt'); // erase last value
|
||||
dolibarr_set_const($db, 'MAIN_LAST_PING_KO_DATE', dol_print_date($now, 'dayhourlog', 'gmt'), 'chaine', 0, '', $conf->entity); // erase last value
|
||||
print 'First ping KO saved for entity '.$conf->entity;
|
||||
} else {
|
||||
print 'Error action='.$action.' not supported';
|
||||
|
||||
@@ -60,7 +60,7 @@ class box_services_contracts extends ModeleBoxes
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
$this->hidden = !($user->rights->service->lire && $user->rights->contrat->lire);
|
||||
$this->hidden = !(!empty($user->rights->service->lire) && !empty($user->rights->contrat->lire));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Xavier Dutoit <doli@sydesy.com>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2021 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2005-2021 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2014 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2008 Matteli
|
||||
* Copyright (C) 2011-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
@@ -1420,7 +1420,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
||||
}
|
||||
|
||||
$themeparam = '?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss', 'aZ09') ? '&optioncss='.GETPOST('optioncss', 'aZ09', 1) : '').'&userid='.$user->id.'&entity='.$conf->entity;
|
||||
$themeparam .= ($ext ? '&'.$ext : '').'&revision='.$conf->global->MAIN_IHM_PARAMS_REV;
|
||||
$themeparam .= ($ext ? '&'.$ext : '').'&revision='.(empty($conf->global->MAIN_IHM_PARAMS_REV) ? '0' : $conf->global->MAIN_IHM_PARAMS_REV);
|
||||
if (!empty($_SESSION['dol_resetcache'])) {
|
||||
$themeparam .= '&dol_resetcache='.$_SESSION['dol_resetcache'];
|
||||
}
|
||||
@@ -3090,7 +3090,7 @@ if (!function_exists("llxFooter")) {
|
||||
} else {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
print "\n".'<!-- Includes JS for Ping of Dolibarr forceping='.$forceping.' MAIN_FIRST_PING_OK_DATE='.$conf->global->MAIN_FIRST_PING_OK_DATE.' MAIN_FIRST_PING_OK_ID='.$conf->global->MAIN_FIRST_PING_OK_ID.' MAIN_LAST_PING_KO_DATE='.$conf->global->MAIN_LAST_PING_KO_DATE.' -->'."\n";
|
||||
print "\n".'<!-- Includes JS for Ping of Dolibarr forceping='.$forceping.' MAIN_FIRST_PING_OK_DATE='.(empty($conf->global->MAIN_FIRST_PING_OK_DATE) ? '' : $conf->global->MAIN_FIRST_PING_OK_DATE).' MAIN_FIRST_PING_OK_ID='.(empty($conf->global->MAIN_FIRST_PING_OK_ID) ? '' : $conf->global->MAIN_FIRST_PING_OK_ID).' MAIN_LAST_PING_KO_DATE='.(empty($conf->global->MAIN_LAST_PING_KO_DATE) ? '' : $conf->global->MAIN_LAST_PING_KO_DATE).' -->'."\n";
|
||||
print "\n<!-- JS CODE TO ENABLE the anonymous Ping -->\n";
|
||||
$url_for_ping = (empty($conf->global->MAIN_URL_FOR_PING) ? "https://ping.dolibarr.org/" : $conf->global->MAIN_URL_FOR_PING);
|
||||
// Try to guess the distrib used
|
||||
|
||||
Reference in New Issue
Block a user