update code toward php8 compliance

This commit is contained in:
Philippe GRAND 2022-09-24 14:35:45 +02:00
parent 67dd86ef83
commit e0ca87516f
3 changed files with 5 additions and 5 deletions

View File

@ -1867,10 +1867,10 @@ class Adherent extends CommonObject
$outputlangs = $langs;
$newlang = '';
$lang_id = GETPOST('lang_id');
if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && !empty($lang_id)) {
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && !empty($lang_id)) {
$newlang = $lang_id;
}
if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) {
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
$newlang = $customer->default_lang;
}
if (!empty($newlang)) {

View File

@ -397,7 +397,7 @@ class AdherentType extends CommonObject
$this->description = $this->db->escape($this->note_public);
// Multilangs
if (!empty($conf->global->MAIN_MULTILANGS)) {
if (getDolGlobalInt('MAIN_MULTILANGS')) {
if ($this->setMultiLangs($user) < 0) {
$this->error = $langs->trans("Error")." : ".$this->db->error()." - ".$sql;
return -2;
@ -509,7 +509,7 @@ class AdherentType extends CommonObject
$this->vote = $obj->vote;
// multilangs
if (!empty($conf->global->MAIN_MULTILANGS)) {
if (getDolGlobalInt('MAIN_MULTILANGS')) {
$this->getMultiLangs();
}

View File

@ -472,7 +472,7 @@ print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width=
// Use 2 languages into PDF
print '<tr class="oddeven"><td>'.$langs->trans("PDF_USE_ALSO_LANGUAGE_CODE").'</td><td>';
//if (!empty($conf->global->MAIN_MULTILANGS))
//if (getDolGlobalInt('MAIN_MULTILANGS'))
//{
$selected = GETPOSTISSET('PDF_USE_ALSO_LANGUAGE_CODE') ? GETPOST('PDF_USE_ALSO_LANGUAGE_CODE') : (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) ? $conf->global->PDF_USE_ALSO_LANGUAGE_CODE : 0);
print $formadmin->select_language($selected, 'PDF_USE_ALSO_LANGUAGE_CODE', 0, null, 1);