Fix box of task hidden if tasks are not used

This commit is contained in:
Laurent Destailleur 2019-11-26 17:44:21 +01:00
parent 30ea48a715
commit 3a687b1dae

View File

@ -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));
}
/**