2
0
forked from Wavyzz/dolibarr

Fix: Avoid warning messages with some modules

This commit is contained in:
Laurent Destailleur
2011-12-21 18:31:27 +01:00
parent 28002e5104
commit 4222f67acb

View File

@@ -4371,7 +4371,7 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode=
foreach ($conf->tabs_modules[$type] as $value)
{
$values=explode(':',$value);
if ($mode == 'add')
if ($mode == 'add' && ! preg_match('/^\-/',$values[1]))
{
if (sizeof($values) == 6) // new declaration with permissions
{
@@ -4404,7 +4404,7 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode=
$h++;
}
}
else if ($mode == 'remove')
else if ($mode == 'remove' && preg_match('/^\-/',$values[1]))
{
if ($values[0] != $type) continue;
$tabname=str_replace('-','',$values[1]);