diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index fb4461f94e3..b90f3c8ebd0 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -31,6 +31,11 @@ // $noback may be defined // $triggermodname may be defined +$hidedetails = isset($hidedetails) ? $hidedetails : ''; +$hidedesc = isset($hidedesc) ? $hidedesc : ''; +$hideref = isset($hideref) ? $hideref : ''; + + if (!empty($permissionedit) && empty($permissiontoadd)) { $permissiontoadd = $permissionedit; // For backward compatibility } @@ -381,10 +386,10 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $permissiontoadd) { if (method_exists($object, 'generateDocument')) { $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) {