New: possibility to defined a tab for all entities in module descriptor

This commit is contained in:
Regis Houssin
2015-07-03 11:16:24 +02:00
parent 6ef0b8e330
commit b70dfd0d54
2 changed files with 13 additions and 1 deletions

View File

@@ -1000,7 +1000,18 @@ print $sql;
$i=0;
foreach ($this->tabs as $key => $value)
{
if ($value)
if (is_array($value) && count($value) == 0) continue; // Discard empty arrays
$entity=$conf->entity;
$newvalue = $value;
if (is_array($value))
{
$newvalue = $value['data'];
if (isset($value['entity'])) $entity = $value['entity'];
}
if ($newvalue)
{
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (";
$sql.= "name";