From cdd2c165ef4b706091d0793348a4534524140d28 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Fri, 5 Feb 2021 11:36:12 +0100 Subject: [PATCH] add missing hook addMoreActionsButtons in viewcat.php --- htdocs/categories/viewcat.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 958b77e42e8..5ad45f6b420 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -269,16 +269,19 @@ dol_fiche_end(); */ print "
\n"; +$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +if (empty($reshook)) { + if ($user->rights->categorie->creer) + { + $socid = ($object->socid ? "&socid=".$object->socid : ""); + print "".$langs->trans("Modify").""; + } -if ($user->rights->categorie->creer) -{ - $socid = ($object->socid ? "&socid=".$object->socid : ""); - print "".$langs->trans("Modify").""; -} - -if ($user->rights->categorie->supprimer) -{ - print "".$langs->trans("Delete").""; + if ($user->rights->categorie->supprimer) + { + print "".$langs->trans("Delete").""; + } } print "
";