From 751dfd561e7a156cf672ea13ea8de816904e3c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 20 Aug 2025 18:51:55 +0200 Subject: [PATCH] fix parameters (#35012) --- .../modulebuilder/template/class/actions_mymodule.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/modulebuilder/template/class/actions_mymodule.class.php b/htdocs/modulebuilder/template/class/actions_mymodule.class.php index f885a0c48ae..8999952cd36 100644 --- a/htdocs/modulebuilder/template/class/actions_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/actions_mymodule.class.php @@ -301,13 +301,14 @@ class ActionsMyModule extends CommonHookActions * Overload the restrictedArea function : check permission on an object * * @param array $parameters Hook metadata (context, etc...) + * @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...) * @param string $action Current action (if set). Generally create or edit or null * @param HookManager $hookmanager Hook manager propagated to allow calling another hook * @return int Return integer <0 if KO, * =0 if OK but we want to process standard actions too, * >0 if OK and we want to replace standard actions. */ - public function restrictedArea($parameters, &$action, $hookmanager) + public function restrictedArea($parameters, $object, &$action, $hookmanager) { global $user; @@ -380,7 +381,7 @@ class ActionsMyModule extends CommonHookActions /** - * Overload the showLinkToObjectBlock function : add or replace array of object likable + * Overload the showLinkToObjectBlock function : add or replace array of object linkable * * @param array $parameters Hook metadata (context, etc...) * @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)