diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 5e5655f918f..c971cf42091 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -668,7 +668,7 @@ Whet is definition of "shippable" according to all different STOCK_CALCULATE_... print '
| '; +print ' | '; print ' | '; //print $langs->trans("from").': '; @@ -433,12 +445,18 @@ if (!empty($conf->global->BLOCKEDLOG_SCAN_ALL_FOR_LOWERIDINERROR)) { // This is version that optimize the memory (but will not report errors that are outside the filter range) $loweridinerror = 0; $checkresult = array(); + $checkdetail = array(); if (is_array($blocks)) { foreach ($blocks as &$block) { - $checksignature = $block->checkSignature(); // Note: this make a sql request at each call, we can't avoid this as the sorting order is various + $tmpcheckresult = $block->checkSignature('', 1); // Note: this make a sql request at each call, we can't avoid this as the sorting order is various + + $checksignature = $tmpcheckresult['checkresult']; + $checkresult[$block->id] = $checksignature; // false if error + $checkdetail[$block->id] = $tmpcheckresult; + if (!$checksignature) { if (empty($loweridinerror)) $loweridinerror = $block->id; @@ -450,13 +468,23 @@ if (!empty($conf->global->BLOCKEDLOG_SCAN_ALL_FOR_LOWERIDINERROR)) { if (is_array($blocks)) { + $nbshown = 0; + $MAXFORSHOWLINK = 100; + $object_link = ''; + foreach ($blocks as &$block) { - $object_link = $block->getObjectLink(); - //if (empty($search_showonlyerrors) || ! $checkresult[$block->id] || ($loweridinerror && $block->id >= $loweridinerror)) if (empty($search_showonlyerrors) || !$checkresult[$block->id]) { + $nbshown++; + + if ($nbshown < $MAXFORSHOWLINK) { // For performance and memory purpose, we get/show the link of objects only for the 100 first output + $object_link = $block->getObjectLink(); + } else { + $object_link = $block->element.'/'.$block->fk_object; + } + print ' | |||||||||
| '.$langs->trans('log'.$block->action).' | '; // Ref - print ''.$block->ref_object.' | '; + print ''; + print $block->ref_object; + print ' | '; // Link to source object print ''.$object_link.' | '; @@ -488,19 +518,26 @@ if (is_array($blocks)) // Fingerprint print '';
- print $form->textwithpicto(dol_trunc($block->signature, '8'), $block->signature, 1, 'help', '', 0, 2, 'fingerprint'.$block->id);
+ $texttoshow = $langs->trans("Fingerprint").' - '.$langs->trans("Saved").': '.$block->signature; + $texttoshow .= ' '.$langs->trans("Fingerprint").' - Recalculated sha256(previoushash * data): '.$checkdetail[$block->id]['calculatedsignature']; + $texttoshow .= ' '.$langs->trans("PreviousHash").'='.$checkdetail[$block->id]['previoushash'].''; + //$texttoshow .= ' keyforsignature='.$checkdetail[$block->id]['keyforsignature']; + print $form->textwithpicto(dol_trunc($block->signature, '8'), $texttoshow, 1, 'help', '', 0, 2, 'fingerprint'.$block->id); print ' | ';
// Status
print ''; if (!$checkresult[$block->id] || ($loweridinerror && $block->id >= $loweridinerror)) // If error { - if ($checkresult[$block->id]) print img_picto($langs->trans('OkCheckFingerprintValidityButChainIsKo'), 'statut4'); - else print img_picto($langs->trans('KoCheckFingerprintValidity'), 'statut8'); + if ($checkresult[$block->id]) { + print 'OK'; + } + else { + print 'KO'; + } } else { - print img_picto($langs->trans('OkCheckFingerprintValidity'), 'statut4'); + print 'OK'; } - print ' | '; // Note @@ -520,6 +557,10 @@ if (is_array($blocks)) print '||||||
| '.$langs->trans("NoRecordFound").' | |||||||||||