update code toward php8 compliance

This commit is contained in:
Philippe GRAND 2022-09-24 15:04:40 +02:00
parent e10abd95f1
commit 15c6c8ba42

View File

@ -583,7 +583,7 @@ if (!$user->admin) {
$sql .= " AND (private = 0 OR (private = 1 AND fk_user = ".((int) $user->id)."))"; // Show only public and private to me $sql .= " AND (private = 0 OR (private = 1 AND fk_user = ".((int) $user->id)."))"; // Show only public and private to me
$sql .= " AND (active = 1 OR fk_user = ".((int) $user->id).")"; // Show only active or owned by me $sql .= " AND (active = 1 OR fk_user = ".((int) $user->id).")"; // Show only active or owned by me
} }
if (empty($conf->global->MAIN_MULTILANGS)) { if (!getDolGlobalInt('MAIN_MULTILANGS')) {
$sql .= " AND (lang = '".$db->escape($langs->defaultlang)."' OR lang IS NULL OR lang = '')"; $sql .= " AND (lang = '".$db->escape($langs->defaultlang)."' OR lang IS NULL OR lang = '')";
} }
if ($search_label) { if ($search_label) {
@ -706,7 +706,7 @@ if ($action == 'add') {
$valuetoshow = $langs->trans("Owner"); $valuetoshow = $langs->trans("Owner");
} }
if ($fieldlist[$field] == 'lang') { if ($fieldlist[$field] == 'lang') {
$valuetoshow = (empty($conf->global->MAIN_MULTILANGS) ? ' ' : $langs->trans("Language")); $valuetoshow = (!getDolGlobalInt('MAIN_MULTILANGS') ? ' ' : $langs->trans("Language"));
} }
if ($fieldlist[$field] == 'type') { if ($fieldlist[$field] == 'type') {
$valuetoshow = $langs->trans("Type"); $valuetoshow = $langs->trans("Type");