2
0
forked from Wavyzz/dolibarr

update code toward php8 compliance

This commit is contained in:
Philippe GRAND
2022-09-24 14:43:29 +02:00
parent fdd79cfa14
commit 2a5b91e3a2
5 changed files with 6 additions and 6 deletions

View File

@@ -401,7 +401,7 @@ class FormMail extends Form
// Define output language // Define output language
$outputlangs = $langs; $outputlangs = $langs;
$newlang = ''; $newlang = '';
if (!empty($conf->global->MAIN_MULTILANGS) && !empty($this->param['langsmodels'])) { if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($this->param['langsmodels'])) {
$newlang = $this->param['langsmodels']; $newlang = $this->param['langsmodels'];
} }
if (!empty($newlang)) { if (!empty($newlang)) {

View File

@@ -1264,7 +1264,7 @@ class FormTicket
// Define output language // Define output language
$outputlangs = $langs; $outputlangs = $langs;
$newlang = ''; $newlang = '';
if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
$newlang = $this->param['langsmodels']; $newlang = $this->param['langsmodels'];
} }
if (!empty($newlang)) { if (!empty($newlang)) {
@@ -1311,7 +1311,7 @@ class FormTicket
// Define output language // Define output language
$outputlangs = $langs; $outputlangs = $langs;
$newlang = ''; $newlang = '';
if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
$newlang = $this->param['langsmodels']; $newlang = $this->param['langsmodels'];
} }
if (!empty($newlang)) { if (!empty($newlang)) {

View File

@@ -49,7 +49,7 @@ function categories_prepare_head(Categorie $object, $type)
$head[$h][2] = 'photos'; $head[$h][2] = 'photos';
$h++; $h++;
if (!empty($conf->global->MAIN_MULTILANGS)) { if (getDolGlobalInt('MAIN_MULTILANGS')) {
$head[$h][0] = DOL_URL_ROOT.'/categories/traduction.php?id='.$object->id.'&type='.$type; $head[$h][0] = DOL_URL_ROOT.'/categories/traduction.php?id='.$object->id.'&type='.$type;
$head[$h][1] = $langs->trans("Translation"); $head[$h][1] = $langs->trans("Translation");
$head[$h][2] = 'translation'; $head[$h][2] = 'translation';

View File

@@ -57,7 +57,7 @@ function doc_getlinedesc($line, $outputlangs, $hideref = 0, $hidedesc = 0, $issu
if ($idprod) { if ($idprod) {
$prodser->fetch($idprod); $prodser->fetch($idprod);
// If a predefined product and multilang and on other lang, we renamed label with label translated // If a predefined product and multilang and on other lang, we renamed label with label translated
if (!empty($conf->global->MAIN_MULTILANGS) && ($outputlangs->defaultlang != $langs->defaultlang)) { if (getDolGlobalInt('MAIN_MULTILANGS') && ($outputlangs->defaultlang != $langs->defaultlang)) {
if (!empty($prodser->multilangs[$outputlangs->defaultlang]["label"]) && $label == $prodser->label) { if (!empty($prodser->multilangs[$outputlangs->defaultlang]["label"]) && $label == $prodser->label) {
$label = $prodser->multilangs[$outputlangs->defaultlang]["label"]; $label = $prodser->multilangs[$outputlangs->defaultlang]["label"];
} }

View File

@@ -149,7 +149,7 @@ function member_type_prepare_head(AdherentType $object)
$h++; $h++;
// Multilangs // Multilangs
if (!empty($conf->global->MAIN_MULTILANGS)) { if (getDolGlobalInt('MAIN_MULTILANGS')) {
$head[$h][0] = DOL_URL_ROOT."/adherents/type_translation.php?rowid=".$object->id; $head[$h][0] = DOL_URL_ROOT."/adherents/type_translation.php?rowid=".$object->id;
$head[$h][1] = $langs->trans("Translation"); $head[$h][1] = $langs->trans("Translation");
$head[$h][2] = 'translation'; $head[$h][2] = 'translation';