Fix autojump when 1 record found

This commit is contained in:
Laurent Destailleur 2019-09-18 20:16:39 +02:00
parent a43253eab8
commit 2286cc2a5f
2 changed files with 2 additions and 2 deletions

View File

@ -321,7 +321,7 @@ if (! $resql)
$num = $db->num_rows($resql);
// Direct jump if only one record found
if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall)
if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall && ! $page)
{
$obj = $db->fetch_object($resql);
$id = $obj->rowid;

View File

@ -291,7 +291,7 @@ else
}
// Direct jump if only one record found
if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all)
if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && ! $page)
{
$obj = $db->fetch_object($resql);
$id = $obj->rowid;