diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index b45450396bc..c9e71665c7b 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -672,8 +672,6 @@ $shipment = new Expedition($db); $title = $langs->trans('Shipments'); $help_url = 'EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expediciones'; -llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'bodyforlist mod-expedition page-list'); - $sql = 'SELECT'; if ($search_all || $search_user > 0) { $sql = 'SELECT DISTINCT'; @@ -924,10 +922,8 @@ if (!$resql) { $num = $db->num_rows($resql); -$arrayofselected = is_array($toselect) ? $toselect : array(); - // Redirect to expedition card if there is only one result for global search -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) { +if ($num == 1 && getDolGlobalInt('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all) { $obj = $db->fetch_object($resql); $id = $obj->rowid; header("Location: ".DOL_URL_ROOT.'/expedition/card.php?id='.$id); @@ -942,6 +938,13 @@ if ($socid > 0) { } } +// Output page +// -------------------------------------------------------------------- + +llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'bodyforlist mod-expedition page-list'); + +$arrayofselected = is_array($toselect) ? $toselect : array(); + $param = ''; if ($socid > 0) { $param .= '&socid='.urlencode((string) ($socid));