From 3a687b1daea90777cd21d60de9290273af098273 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 26 Nov 2019 17:44:21 +0100 Subject: [PATCH] Fix box of task hidden if tasks are not used --- htdocs/core/boxes/box_task.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php index 193bcdae2d6..0f5a5e35225 100644 --- a/htdocs/core/boxes/box_task.php +++ b/htdocs/core/boxes/box_task.php @@ -56,7 +56,7 @@ class box_task extends ModeleBoxes */ public function __construct($db, $param = '') { - global $user, $langs; + global $conf, $user, $langs; // Load translation files required by the page $langs->loadLangs(array('boxes', 'projects')); @@ -64,7 +64,7 @@ class box_task extends ModeleBoxes $this->boxlabel = "Tasks"; $this->db = $db; - $this->hidden = !($user->rights->projet->lire); + $this->hidden = (!empty($conf->global->PROJECT_HIDE_TASKS) || !($user->rights->projet->lire)); } /**