From 47da6793c5707980c6af54285d4a3b63aa49134e Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 16 Nov 2021 13:31:51 +0100 Subject: [PATCH 1/2] FIX: contact not listed if module mainling not active and contact has no email --- htdocs/contact/list.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 391535d784e..dc8c77d0e1e 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -75,7 +75,11 @@ $search_phone_pro = GETPOST("search_phone_pro", 'alpha'); $search_phone_mobile = GETPOST("search_phone_mobile", 'alpha'); $search_fax = GETPOST("search_fax", 'alpha'); $search_email = GETPOST("search_email", 'alpha'); -$search_no_email = GETPOST("search_no_email", 'int'); +if (!empty($conf->mailing->enabled)) { + $search_no_email = GETPOST("search_no_email", 'int'); +} else { + $search_no_email = -1; +} if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { if ($value['active']) { From bc64aba3a628e1d93a69cca0fa6330c281ae2708 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 16 Nov 2021 13:43:08 +0100 Subject: [PATCH 2/2] FIX: preselect task on create event from task --- htdocs/comm/action/card.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 00e6b025b44..54cfea64743 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1223,7 +1223,11 @@ if ($action == 'create') { if (!empty($projectid)) { $projectsListId = $projectid; } - $tid = GETPOST("projecttaskid") ? GETPOST("projecttaskid") : ''; + if ($origin=='task') { + $tid= GETPOST("originid"); + } else { + $tid = GETPOST("projecttaskid") ? GETPOST("projecttaskid") : ''; + } $formproject->selectTasks((!empty($societe->id) ? $societe->id : -1), $tid, 'taskid', 24, 0, '1', 1, 0, 0, 'maxwidth500', $projectsListId); print ''; }