Fix: broken feature
This commit is contained in:
parent
23707e2346
commit
1cbd2a1b1c
@ -66,21 +66,21 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($
|
||||
$subelement = $regs[2];
|
||||
}
|
||||
|
||||
if ($element == 'propal') $element = 'propale';
|
||||
else if ($element == 'fichinter') $element = 'ficheinter';
|
||||
else if ($element == 'product') $element = 'produit';
|
||||
else if ($element == 'member') $element = 'adherent';
|
||||
if ($element == 'propal') $newelement = 'propale';
|
||||
else if ($element == 'fichinter') $newelement = 'ficheinter';
|
||||
else if ($element == 'product') $newelement = 'produit';
|
||||
else if ($element == 'member') $newelement = 'adherent';
|
||||
else if ($element == 'order_supplier') {
|
||||
$element = 'fournisseur';
|
||||
$newelement = 'fournisseur';
|
||||
$subelement = 'commande';
|
||||
}
|
||||
else if ($element == 'invoice_supplier') {
|
||||
$element = 'fournisseur';
|
||||
$newelement = 'fournisseur';
|
||||
$subelement = 'facture';
|
||||
}
|
||||
|
||||
if (! empty($user->rights->$element->creer) || ! empty($user->rights->$element->write)
|
||||
|| (isset($subelement) && (! empty($user->rights->$element->$subelement->creer) || ! empty($user->rights->$element->$subelement->write)))
|
||||
if (! empty($user->rights->$newelement->creer) || ! empty($user->rights->$newelement->write)
|
||||
|| (isset($subelement) && (! empty($user->rights->$newelement->$subelement->creer) || ! empty($user->rights->$newelement->$subelement->write)))
|
||||
|| ($element == 'payment' && $user->rights->facture->paiement)
|
||||
|| ($element == 'payment_supplier' && $user->rights->fournisseur->facture->creer))
|
||||
{
|
||||
|
||||
@ -1522,7 +1522,7 @@ else
|
||||
}
|
||||
|
||||
// Other options
|
||||
$parameters=array();
|
||||
$parameters=array('colspan' => ' colspan="3"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
print '</table>';
|
||||
@ -2053,4 +2053,4 @@ else
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user