From e00e7e1faa19af6f3d18a5cc36ca7147e93ce1c5 Mon Sep 17 00:00:00 2001 From: Faustin Date: Mon, 13 Jun 2022 14:13:51 +0200 Subject: [PATCH 1/8] replaced projet from old version by project --- htdocs/core/lib/contact.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php index b63e7b025c7..884efb16482 100644 --- a/htdocs/core/lib/contact.lib.php +++ b/htdocs/core/lib/contact.lib.php @@ -174,7 +174,7 @@ function show_contacts_projects($conf, $langs, $db, $object, $backtopage = '', $ $langs->load("projects"); $newcardbutton = ''; - if (!empty($conf->project->enabled) && $user->rights->projet->creer && empty($nocreatelink)) { + if (!empty($conf->projet->enabled) && $user->rights->projet->creer && empty($nocreatelink)) { $newcardbutton .= dolGetButtonTitle($langs->trans('AddProject'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage)); } From 2392d1c59c699c5bcec97a0e507f9bc0aa28c5be Mon Sep 17 00:00:00 2001 From: Faustin Date: Mon, 13 Jun 2022 14:14:06 +0200 Subject: [PATCH 2/8] replaced projet from old version by project --- htdocs/core/lib/contact.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php index 884efb16482..b63e7b025c7 100644 --- a/htdocs/core/lib/contact.lib.php +++ b/htdocs/core/lib/contact.lib.php @@ -174,7 +174,7 @@ function show_contacts_projects($conf, $langs, $db, $object, $backtopage = '', $ $langs->load("projects"); $newcardbutton = ''; - if (!empty($conf->projet->enabled) && $user->rights->projet->creer && empty($nocreatelink)) { + if (!empty($conf->project->enabled) && $user->rights->projet->creer && empty($nocreatelink)) { $newcardbutton .= dolGetButtonTitle($langs->trans('AddProject'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage)); } From 7f73464ecc51b679163cb2f5807c7a468a904c8e Mon Sep 17 00:00:00 2001 From: NASDAMI Quatadah Date: Mon, 13 Jun 2022 16:17:18 +0200 Subject: [PATCH 3/8] Increasing the scope of the variable --- htdocs/core/boxes/box_project.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index 909ff32acb9..523f18d6c33 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -83,8 +83,7 @@ class box_project extends ModeleBoxes $textHead = $langs->trans("OpenedProjects"); $this->info_box_head = array('text' => $textHead, 'limit'=> dol_strlen($textHead)); - - $i = 0; + $num = 0; // list the summary of the orders if ($user->rights->projet->lire) { include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; From 9f4690eedda1118a1af4267b63a22306977558c5 Mon Sep 17 00:00:00 2001 From: Faustin Date: Wed, 15 Jun 2022 15:02:48 +0200 Subject: [PATCH 4/8] Conflict management --- htdocs/core/lib/contact.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php index b63e7b025c7..d51b3cd02db 100644 --- a/htdocs/core/lib/contact.lib.php +++ b/htdocs/core/lib/contact.lib.php @@ -170,11 +170,11 @@ function show_contacts_projects($conf, $langs, $db, $object, $backtopage = '', $ $i = -1; - if (!empty($conf->project->enabled) && $user->rights->projet->lire) { + if (!empty($conf->projet->enabled) && $user->rights->projet->lire) { $langs->load("projects"); $newcardbutton = ''; - if (!empty($conf->project->enabled) && $user->rights->projet->creer && empty($nocreatelink)) { + if (!empty($conf->projet->enabled) && $user->rights->projet->creer && empty($nocreatelink)) { $newcardbutton .= dolGetButtonTitle($langs->trans('AddProject'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage)); } From 0f77d945a96eeb597430a0fddd5a683a84bb1c16 Mon Sep 17 00:00:00 2001 From: Faustin Date: Wed, 15 Jun 2022 15:05:07 +0200 Subject: [PATCH 5/8] Conflict management --- htdocs/core/lib/contact.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php index d51b3cd02db..8ade2200724 100644 --- a/htdocs/core/lib/contact.lib.php +++ b/htdocs/core/lib/contact.lib.php @@ -57,7 +57,7 @@ function contact_prepare_head(Contact $object) $head[$tab][2] = 'perso'; $tab++; - if (!empty($conf->project->enabled) && $user->hasRight('project', 'lire')) { + if (!empty($conf->projet->enabled) && (!empty($user->rights->projet->lire))) { $nbProject = 0; // Enable caching of thirdrparty count projects require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; From 4874b8d94a8dafce79614386767efd658c877635 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 14 Jun 2022 17:53:17 +0200 Subject: [PATCH 6/8] Fix conf->projet conf->project --- htdocs/core/lib/contact.lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php index 8ade2200724..220c088fc11 100644 --- a/htdocs/core/lib/contact.lib.php +++ b/htdocs/core/lib/contact.lib.php @@ -57,7 +57,7 @@ function contact_prepare_head(Contact $object) $head[$tab][2] = 'perso'; $tab++; - if (!empty($conf->projet->enabled) && (!empty($user->rights->projet->lire))) { + if (!empty($conf->project->enabled) && (!empty($user->rights->projet->lire))) { $nbProject = 0; // Enable caching of thirdrparty count projects require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; @@ -170,11 +170,11 @@ function show_contacts_projects($conf, $langs, $db, $object, $backtopage = '', $ $i = -1; - if (!empty($conf->projet->enabled) && $user->rights->projet->lire) { + if (!empty($conf->project->enabled) && $user->rights->projet->lire) { $langs->load("projects"); $newcardbutton = ''; - if (!empty($conf->projet->enabled) && $user->rights->projet->creer && empty($nocreatelink)) { + if (!empty($conf->project->enabled) && $user->rights->projet->creer && empty($nocreatelink)) { $newcardbutton .= dolGetButtonTitle($langs->trans('AddProject'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage)); } From 6696d3d4eb173e348776c4c747c81a2e40d1ce6a Mon Sep 17 00:00:00 2001 From: Faustin Date: Wed, 15 Jun 2022 15:28:31 +0200 Subject: [PATCH 7/8] Conflict --- htdocs/core/lib/contact.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php index 220c088fc11..b63e7b025c7 100644 --- a/htdocs/core/lib/contact.lib.php +++ b/htdocs/core/lib/contact.lib.php @@ -57,7 +57,7 @@ function contact_prepare_head(Contact $object) $head[$tab][2] = 'perso'; $tab++; - if (!empty($conf->project->enabled) && (!empty($user->rights->projet->lire))) { + if (!empty($conf->project->enabled) && $user->hasRight('project', 'lire')) { $nbProject = 0; // Enable caching of thirdrparty count projects require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; From baf28abf7a68f61739baa44e3904702e8b6bec77 Mon Sep 17 00:00:00 2001 From: Faustin Date: Wed, 15 Jun 2022 15:30:35 +0200 Subject: [PATCH 8/8] Conflict --- htdocs/core/boxes/box_project.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index 523f18d6c33..909ff32acb9 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -83,7 +83,8 @@ class box_project extends ModeleBoxes $textHead = $langs->trans("OpenedProjects"); $this->info_box_head = array('text' => $textHead, 'limit'=> dol_strlen($textHead)); - $num = 0; + + $i = 0; // list the summary of the orders if ($user->rights->projet->lire) { include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';