Merge pull request #14315 from OPEN-DSI/v10-fix-contact-list-redirect-main-search

FIX redirect on contact card from main search
This commit is contained in:
Laurent Destailleur 2020-07-29 12:25:38 +02:00 committed by GitHub
commit c4b3781df0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -389,8 +389,8 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$sql.= $db->plimit($limit+1, $offset); $sql.= $db->plimit($limit+1, $offset);
$result = $db->query($sql); $resql = $db->query($sql);
if (! $result) if (! $resql)
{ {
dol_print_error($db); dol_print_error($db);
exit; exit;
@ -763,7 +763,7 @@ $i = 0;
$totalarray=array(); $totalarray=array();
while ($i < min($num, $limit)) while ($i < min($num, $limit))
{ {
$obj = $db->fetch_object($result); $obj = $db->fetch_object($resql);
print '<tr class="oddeven">'; print '<tr class="oddeven">';
@ -980,7 +980,7 @@ while ($i < min($num, $limit))
$i++; $i++;
} }
$db->free($result); $db->free($resql);
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql); $parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$reshook=$hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook