clean code (#36163)

This commit is contained in:
Frédéric FRANCE
2025-11-08 11:40:51 +01:00
committed by GitHub
parent d4d06084a5
commit cbaf4e3791

View File

@@ -151,7 +151,6 @@ if (empty($reshook)) {
if ($result >= 0) {
// Define output language
if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) {
if (method_exists($object, 'generateDocument')) {
$outputlangs = $langs;
$newlang = '';
if (getDolGlobalInt('MAIN_MULTILANGS') /* && empty($newlang) */ && GETPOST('lang_id', 'aZ09')) {
@@ -174,7 +173,6 @@ if (empty($reshook)) {
setEventMessages($object->error, $object->errors, 'warnings');
}
}
}
} else {
setEventMessages($object->error, $object->errors, 'errors');
}
@@ -183,7 +181,6 @@ if (empty($reshook)) {
if ($result >= 0) {
// Define output language
if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) {
if (method_exists($object, 'generateDocument')) {
$outputlangs = $langs;
$newlang = '';
if (getDolGlobalInt('MAIN_MULTILANGS') /* && empty($newlang) */ && GETPOST('lang_id', 'aZ09')) {
@@ -206,7 +203,6 @@ if (empty($reshook)) {
setEventMessages($object->error, $object->errors, 'warnings');
}
}
}
} else {
setEventMessages($object->error, $object->errors, 'errors');
}