FIX Warning for some country must appears if company is in this country.

This commit is contained in:
Laurent Destailleur 2020-01-01 22:26:47 +01:00
parent 2e8fd25299
commit d3d7592072

View File

@ -825,10 +825,13 @@ if ($mode == 'common')
$warningmessage = '';
if (!empty($arrayofwarnings[$modName]))
{
print '<!-- This module has a warning to show when we activate it (note: your country is '.$mysoc->country_code.') -->'."\n";
print '<!-- This module is a core module and it may have a warning to show when we activate it (note: your country is '.$mysoc->country_code.') -->'."\n";
foreach ($arrayofwarnings[$modName] as $keycountry => $cursorwarningmessage)
{
$warningmessage .= ($warningmessage ? "\n" : "").$langs->trans($cursorwarningmessage, $objMod->getName(), $mysoc->country_code);
if (preg_match('/^always/', $keycountry) || ($mysoc->country_code && preg_match('/^'.$mysoc->country_code.'/', $keycountry)))
{
$warningmessage .= ($warningmessage ? "\n" : "").$langs->trans($cursorwarningmessage, $objMod->getName(), $mysoc->country_code);
}
}
}
if ($objMod->isCoreOrExternalModule() == 'external' && !empty($arrayofwarningsext))