update code toward php8 compliance
This commit is contained in:
parent
67dd86ef83
commit
e0ca87516f
@ -1867,10 +1867,10 @@ class Adherent extends CommonObject
|
|||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang = '';
|
$newlang = '';
|
||||||
$lang_id = GETPOST('lang_id');
|
$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;
|
$newlang = $lang_id;
|
||||||
}
|
}
|
||||||
if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) {
|
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
|
||||||
$newlang = $customer->default_lang;
|
$newlang = $customer->default_lang;
|
||||||
}
|
}
|
||||||
if (!empty($newlang)) {
|
if (!empty($newlang)) {
|
||||||
|
|||||||
@ -397,7 +397,7 @@ class AdherentType extends CommonObject
|
|||||||
$this->description = $this->db->escape($this->note_public);
|
$this->description = $this->db->escape($this->note_public);
|
||||||
|
|
||||||
// Multilangs
|
// Multilangs
|
||||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||||
if ($this->setMultiLangs($user) < 0) {
|
if ($this->setMultiLangs($user) < 0) {
|
||||||
$this->error = $langs->trans("Error")." : ".$this->db->error()." - ".$sql;
|
$this->error = $langs->trans("Error")." : ".$this->db->error()." - ".$sql;
|
||||||
return -2;
|
return -2;
|
||||||
@ -509,7 +509,7 @@ class AdherentType extends CommonObject
|
|||||||
$this->vote = $obj->vote;
|
$this->vote = $obj->vote;
|
||||||
|
|
||||||
// multilangs
|
// multilangs
|
||||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||||
$this->getMultiLangs();
|
$this->getMultiLangs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -472,7 +472,7 @@ print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width=
|
|||||||
// Use 2 languages into PDF
|
// Use 2 languages into PDF
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("PDF_USE_ALSO_LANGUAGE_CODE").'</td><td>';
|
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);
|
$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);
|
print $formadmin->select_language($selected, 'PDF_USE_ALSO_LANGUAGE_CODE', 0, null, 1);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user