Fix php8.2 warnings

This commit is contained in:
Laurent Destailleur
2023-11-27 11:39:32 +01:00
parent de96af8543
commit 53dab922fd
407 changed files with 2909 additions and 2908 deletions

View File

@@ -83,7 +83,7 @@ class box_commandes extends ModeleBoxes
$societestatic = new Societe($this->db);
$userstatic = new User($this->db);
$this->info_box_head = array('text' => $langs->trans("BoxTitleLast".(!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) ? "" : "Modified")."CustomerOrders", $max));
$this->info_box_head = array('text' => $langs->trans("BoxTitleLast".(getDolGlobalString('MAIN_LASTBOX_ON_OBJECT_DATE') ? "" : "Modified")."CustomerOrders", $max));
if ($user->hasRight('commande', 'lire')) {
$sql = "SELECT s.rowid as socid, s.nom as name, s.name_alias";
@@ -105,7 +105,7 @@ class box_commandes extends ModeleBoxes
}
$sql .= " WHERE c.fk_soc = s.rowid";
$sql .= " AND c.entity IN (".getEntity('commande').")";
if (!empty($conf->global->ORDER_BOX_LAST_ORDERS_VALIDATED_ONLY)) {
if (getDolGlobalString('ORDER_BOX_LAST_ORDERS_VALIDATED_ONLY')) {
$sql .= " AND c.fk_statut = 1";
}
if (!$user->hasRight('societe', 'client', 'voir') && !$user->socid) {
@@ -114,7 +114,7 @@ class box_commandes extends ModeleBoxes
if ($user->socid) {
$sql .= " AND s.rowid = ".((int) $user->socid);
}
if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) {
if (getDolGlobalString('MAIN_LASTBOX_ON_OBJECT_DATE')) {
$sql .= " ORDER BY c.date_commande DESC, c.ref DESC ";
} else {
$sql .= " ORDER BY c.tms DESC, c.ref DESC ";
@@ -168,7 +168,7 @@ class box_commandes extends ModeleBoxes
'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency),
);
if (!empty($conf->global->ORDER_BOX_LAST_ORDERS_SHOW_VALIDATE_USER)) {
if (getDolGlobalString('ORDER_BOX_LAST_ORDERS_SHOW_VALIDATE_USER')) {
if ($objp->fk_user_valid > 0) {
$userstatic->fetch($objp->fk_user_valid);
}