fix the global DEFAULT_SEARCH_INTO_MODULE - current value will not push anything above the core modules

This commit is contained in:
Christian Foellmann 2020-07-13 18:14:57 +02:00
parent 8b5f4fe9a6
commit a4e9c478e7

View File

@ -154,10 +154,10 @@ if (empty($reshook))
$arrayresult = array_merge($arrayresult, $hookmanager->resArray);
} else $arrayresult = $hookmanager->resArray;
// This allow to keep a search entry to the top
// This pushes 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;
if (array_key_exists($key, $arrayresult)) $arrayresult[$key]['position'] = -1000;
}
// Sort on position