mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
update code toward php8 compliance
This commit is contained in:
parent
804f13fbe6
commit
32b37718c7
|
|
@ -246,7 +246,7 @@ abstract class ActionsCardCommon
|
|||
}
|
||||
|
||||
// Language
|
||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||
$this->tpl['select_lang'] = $formadmin->select_language(($this->object->default_lang ? $this->object->default_lang : $conf->global->MAIN_LANG_DEFAULT), 'default_lang', 0, 0, 1);
|
||||
}
|
||||
|
||||
|
|
@ -306,7 +306,7 @@ abstract class ActionsCardCommon
|
|||
$arr = $formcompany->typent_array(1);
|
||||
$this->tpl['typent'] = $arr[$this->object->typent_code];
|
||||
|
||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
//$s=picto_from_langcode($this->default_lang);
|
||||
//print ($s?$s.' ':'');
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ for ($i = 1; $i <= 4; $i++) {
|
|||
<td><?php echo $this->control->tpl['select_workforce']; echo $this->control->tpl['info_admin']; ?></td>
|
||||
</tr>
|
||||
|
||||
<?php if (!empty($conf->global->MAIN_MULTILANGS)) { ?>
|
||||
<?php if (getDolGlobalInt('MAIN_MULTILANGS')) { ?>
|
||||
<tr>
|
||||
<td><?php echo $langs->trans("DefaultLang"); ?></td>
|
||||
<td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
|
||||
|
|
|
|||
|
|
@ -1804,7 +1804,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
} else {
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</span></td></tr>';
|
||||
}
|
||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||
print '<tr><td>'.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">'."\n";
|
||||
print img_picto('', 'language', 'class="pictofixedwidth"').$formadmin->select_language(GETPOST('default_lang', 'alpha') ? GETPOST('default_lang', 'alpha') : ($object->default_lang ? $object->default_lang : ''), 'default_lang', 0, 0, 1, 0, 0, 'maxwidth200onsmartphone');
|
||||
print '</td>';
|
||||
|
|
@ -2554,7 +2554,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
}
|
||||
|
||||
// Default language
|
||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||
print '<tr><td>'.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0).'</td><td colspan="3">'."\n";
|
||||
print img_picto('', 'language').$formadmin->select_language($object->default_lang, 'default_lang', 0, 0, 1);
|
||||
print '</td>';
|
||||
|
|
@ -3071,7 +3071,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
}
|
||||
|
||||
// Default language
|
||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
print '<tr><td>'.$langs->trans("DefaultLang").'</td><td>';
|
||||
//$s=picto_from_langcode($object->default_lang);
|
||||
|
|
|
|||
|
|
@ -535,7 +535,7 @@ if ($sql_select) {
|
|||
// Product
|
||||
if ($objp->fk_product > 0) {
|
||||
// Define output language
|
||||
if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
|
||||
$prod = new Product($db);
|
||||
$prod->fetch($objp->fk_product);
|
||||
|
||||
|
|
|
|||
|
|
@ -1548,7 +1548,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||
$allowgenifempty = 0;
|
||||
|
||||
// Language code (if multilang)
|
||||
if (!empty($conf->global->MAIN_MULTILANGS)) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
$formadmin = new FormAdmin($db);
|
||||
$defaultlang = $langs->getDefaultLang();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user