Fix: No error once multicompany module has been removed.
This commit is contained in:
parent
efd9337c9f
commit
4a96fd0d77
@ -1300,19 +1300,23 @@ else
|
||||
}
|
||||
|
||||
// Multicompany
|
||||
if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||
// TODO This should be done with hook formObjectOption
|
||||
if (is_object($mc))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Entity").'</td><td width="75%" class="valeur">';
|
||||
if ($object->admin && ! $object->entity)
|
||||
{
|
||||
print $langs->trans("AllEntities");
|
||||
}
|
||||
else
|
||||
{
|
||||
$mc->getInfo($object->entity);
|
||||
print $mc->label;
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Entity").'</td><td width="75%" class="valeur">';
|
||||
if ($object->admin && ! $object->entity)
|
||||
{
|
||||
print $langs->trans("AllEntities");
|
||||
}
|
||||
else
|
||||
{
|
||||
$mc->getInfo($object->entity);
|
||||
print $mc->label;
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
|
||||
@ -148,26 +148,30 @@ if ($resql)
|
||||
$companystatic->canvas=$obj->canvas;
|
||||
print $companystatic->getNomUrl(1);
|
||||
}
|
||||
else if (! empty($conf->multicompany->enabled))
|
||||
{
|
||||
if ($obj->admin && ! $obj->entity)
|
||||
{
|
||||
print $langs->trans("AllEntities");
|
||||
}
|
||||
else
|
||||
{
|
||||
$mc->getInfo($obj->entity);
|
||||
print $mc->label;
|
||||
}
|
||||
}
|
||||
else if ($obj->ldap_sid)
|
||||
{
|
||||
print $langs->trans("DomainUser");
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("InternalUser");
|
||||
}
|
||||
if ($obj->ldap_sid)
|
||||
{
|
||||
print ' ('.$langs->trans("DomainUser").')';
|
||||
}
|
||||
// TODO This should be done with a hook
|
||||
if (is_object($mc))
|
||||
{
|
||||
if (! empty($conf->multicompany->enabled))
|
||||
{
|
||||
if ($obj->admin && ! $obj->entity)
|
||||
{
|
||||
print ' ('.$langs->trans("AllEntities").')';
|
||||
}
|
||||
else
|
||||
{
|
||||
$mc->getInfo($obj->entity);
|
||||
print ' ('.$mc->label.')';
|
||||
}
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
print '<td align="right">'.dol_print_date($db->jdate($obj->datec),'dayhour').'</td>';
|
||||
print '<td align="right">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user