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];
|
$subelement = $regs[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($element == 'propal') $element = 'propale';
|
if ($element == 'propal') $newelement = 'propale';
|
||||||
else if ($element == 'fichinter') $element = 'ficheinter';
|
else if ($element == 'fichinter') $newelement = 'ficheinter';
|
||||||
else if ($element == 'product') $element = 'produit';
|
else if ($element == 'product') $newelement = 'produit';
|
||||||
else if ($element == 'member') $element = 'adherent';
|
else if ($element == 'member') $newelement = 'adherent';
|
||||||
else if ($element == 'order_supplier') {
|
else if ($element == 'order_supplier') {
|
||||||
$element = 'fournisseur';
|
$newelement = 'fournisseur';
|
||||||
$subelement = 'commande';
|
$subelement = 'commande';
|
||||||
}
|
}
|
||||||
else if ($element == 'invoice_supplier') {
|
else if ($element == 'invoice_supplier') {
|
||||||
$element = 'fournisseur';
|
$newelement = 'fournisseur';
|
||||||
$subelement = 'facture';
|
$subelement = 'facture';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($user->rights->$element->creer) || ! empty($user->rights->$element->write)
|
if (! empty($user->rights->$newelement->creer) || ! empty($user->rights->$newelement->write)
|
||||||
|| (isset($subelement) && (! empty($user->rights->$element->$subelement->creer) || ! empty($user->rights->$element->$subelement->write)))
|
|| (isset($subelement) && (! empty($user->rights->$newelement->$subelement->creer) || ! empty($user->rights->$newelement->$subelement->write)))
|
||||||
|| ($element == 'payment' && $user->rights->facture->paiement)
|
|| ($element == 'payment' && $user->rights->facture->paiement)
|
||||||
|| ($element == 'payment_supplier' && $user->rights->fournisseur->facture->creer))
|
|| ($element == 'payment_supplier' && $user->rights->fournisseur->facture->creer))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1522,7 +1522,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Other options
|
// 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
|
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
@ -2053,4 +2053,4 @@ else
|
|||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user