Update admin.lib.php

This commit is contained in:
Laurent Destailleur 2021-01-04 12:02:41 +01:00 committed by GitHub
parent e190b010d3
commit bb22f2ccaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1380,14 +1380,12 @@ function complete_elementList_with_modules(&$elementList)
$dirmod[$i] = $dir;
//print "x".$modName." ".$orders[$i]."\n<br>";
if (!empty($objMod->module_parts['contactelement']))
{
if(is_array($objMod->module_parts['contactelement'])) {
if (!empty($objMod->module_parts['contactelement'])) {
if (is_array($objMod->module_parts['contactelement'])) {
foreach ($objMod->module_parts['contactelement'] as $elem => $title) {
$elementList[$elem] = $langs->trans($title);
}
}
else {
} else {
$elementList[$objMod->name] = $langs->trans($objMod->name);
}
}