From c71bebfd217593b6e35d3d66a10cc30092cff5bf Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 2 Mar 2022 20:48:46 +0100 Subject: [PATCH 1/4] Add Init Hooks on several project tabs --- htdocs/projet/document.php | 1 + htdocs/projet/info.php | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index 9e8d3a6ce8e..ef3d455fd82 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; // Load translation files required by the page $langs->loadLangs(array('projects', 'other')); +$hookmanager->initHooks(array('projetcarddocument')); $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); diff --git a/htdocs/projet/info.php b/htdocs/projet/info.php index c0afe5d1370..9712e32ffd2 100644 --- a/htdocs/projet/info.php +++ b/htdocs/projet/info.php @@ -67,6 +67,7 @@ $id = GETPOST("id", 'int'); $socid = 0; //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. $result = restrictedArea($user, 'projet', $id, 'projet&project'); +$hookmanager->initHooks(array('projetcardinfo')); if (!$user->rights->projet->lire) { accessforbidden(); From acb47a4cc74eb8a04dac23cf4766ce6d2ddff7af Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Mar 2022 14:29:39 +0100 Subject: [PATCH 2/4] Update document.php --- htdocs/projet/document.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index ef3d455fd82..2301017edd9 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; // Load translation files required by the page $langs->loadLangs(array('projects', 'other')); -$hookmanager->initHooks(array('projetcarddocument')); +$hookmanager->initHooks(array('projectcarddocument')); $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); From 2ef42c178b96b7746e2d21c6b579a6c12b9568e0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Mar 2022 14:30:38 +0100 Subject: [PATCH 3/4] Update info.php --- htdocs/projet/info.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/info.php b/htdocs/projet/info.php index 9712e32ffd2..a7382c94d1a 100644 --- a/htdocs/projet/info.php +++ b/htdocs/projet/info.php @@ -67,7 +67,7 @@ $id = GETPOST("id", 'int'); $socid = 0; //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. $result = restrictedArea($user, 'projet', $id, 'projet&project'); -$hookmanager->initHooks(array('projetcardinfo')); +$hookmanager->initHooks(array('projectcardinfo')); if (!$user->rights->projet->lire) { accessforbidden(); From feafbaded21f2f5575af4416d04a79a6d1464f37 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Mar 2022 14:31:19 +0100 Subject: [PATCH 4/4] Update info.php --- htdocs/projet/info.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/projet/info.php b/htdocs/projet/info.php index a7382c94d1a..9b0544bccf6 100644 --- a/htdocs/projet/info.php +++ b/htdocs/projet/info.php @@ -62,12 +62,13 @@ if (GETPOST('actioncode', 'array')) { } $search_agenda_label = GETPOST('search_agenda_label'); +$hookmanager->initHooks(array('projectcardinfo')); + // Security check $id = GETPOST("id", 'int'); $socid = 0; //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. $result = restrictedArea($user, 'projet', $id, 'projet&project'); -$hookmanager->initHooks(array('projectcardinfo')); if (!$user->rights->projet->lire) { accessforbidden();