NEW : Add conf to set a search entry to the top

This commit is contained in:
ATM-Nicolas 2018-12-07 15:28:36 +01:00
parent cf00519e90
commit b640035f3d

View File

@ -155,6 +155,12 @@ if (empty($reshook))
}
else $arrayresult=$hookmanager->resArray;
// This allow to keep a search entry to the top
if(! empty($conf->global->DEFAULT_SEARCH_INTO_MODULE)) {
$key = 'searchinto'.$conf->global->DEFAULT_SEARCH_INTO_MODULE;
if(array_key_exists($key, $arrayresult)) $arrayresult[$key]['position'] = -10;
}
// Sort on position
$arrayresult = dol_sort_array($arrayresult, 'position');