forked from Wavyzz/dolibarr
Fix: Avoid warning messages with some modules
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user