From f59a0f5eba1fbcf86c44d85e2bc804f0964211a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Benke?= <1179011+defrance@users.noreply.github.com> Date: Wed, 4 Oct 2023 12:17:02 +0200 Subject: [PATCH 1/2] warning error and duplicate --- htdocs/fichinter/document.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index 32495a8b9ad..51e97cb7bfe 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -129,7 +129,7 @@ if ($object->id) { if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'; - if ($usercancreate && 0) { + if ($permissiontoadd && 0) { $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; @@ -164,7 +164,6 @@ if ($object->id) { print dol_get_fiche_end(); $modulepart = 'ficheinter'; - $permissiontoadd = $user->rights->ficheinter->creer; $permtoedit = $user->rights->ficheinter->creer; $param = '&id='.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; From bf1437ff8be350459987265e24e6b0a3014b0760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Benke?= <1179011+defrance@users.noreply.github.com> Date: Wed, 4 Oct 2023 12:17:56 +0200 Subject: [PATCH 2/2] Update note.php --- htdocs/fichinter/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php index aa2f452bbd0..471c5c64485 100644 --- a/htdocs/fichinter/note.php +++ b/htdocs/fichinter/note.php @@ -94,7 +94,7 @@ if ($id > 0 || !empty($ref)) { if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'; - if ($usercancreate && 0) { + if ($permissionnote && 0) { $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';