2
0
forked from Wavyzz/dolibarr

FIX: search and add extrafields to tasks when conf disabled (#29542)

* FIX: task could be searched even if disabled

* FIX: could add extra fields to task even if disabled
This commit is contained in:
Yannis Hoareau
2024-05-01 17:37:12 +02:00
committed by GitHub
parent ff54b1cb5a
commit 37fcbc34b8
2 changed files with 10 additions and 8 deletions

View File

@@ -92,7 +92,7 @@ if (isModEnabled('mrp') && $user->hasRight('mrp', 'read') && empty($conf->global
if (isModEnabled('project') && empty($conf->global->MAIN_SEARCHFORM_PROJECT_DISABLED) && $user->hasRight('projet', 'lire')) {
$arrayresult['searchintoprojects'] = array('position'=>40, 'shortcut'=>'Q', 'img'=>'object_project', 'label'=>$langs->trans("SearchIntoProjects", $search_boxvalue), 'text'=>img_picto('', 'object_project', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
}
if (isModEnabled('project') && empty($conf->global->MAIN_SEARCHFORM_TASK_DISABLED) && $user->hasRight('projet', 'lire')) {
if (isModEnabled('project') && empty($conf->global->MAIN_SEARCHFORM_TASK_DISABLED) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->hasRight('projet', 'lire')) {
$arrayresult['searchintotasks'] = array('position'=>45, 'img'=>'object_projecttask', 'label'=>$langs->trans("SearchIntoTasks", $search_boxvalue), 'text'=>img_picto('', 'object_projecttask', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/tasks/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
}