2
0
forked from Wavyzz/dolibarr

fix warning in list_print_total.tpl.php (#28233)

* fix warning in list_print_total.tpl.php

* Update list.php
This commit is contained in:
Frédéric FRANCE
2024-02-18 15:24:14 +01:00
committed by GitHub
parent c2eeeabb4a
commit 144ed48fcb
2 changed files with 15 additions and 15 deletions

View File

@@ -2446,7 +2446,7 @@ while ($i < $imaxinloop) {
$userstatic->lastname = $obj->lastname; $userstatic->lastname = $obj->lastname;
$userstatic->firstname = $obj->firstname; $userstatic->firstname = $obj->firstname;
$userstatic->email = $obj->user_email; $userstatic->email = $obj->user_email;
$userstatic->statut = $obj->user_statut; $userstatic->status = $obj->user_statut;
$userstatic->entity = $obj->entity; $userstatic->entity = $obj->entity;
$userstatic->photo = $obj->photo; $userstatic->photo = $obj->photo;
$userstatic->office_phone = $obj->office_phone; $userstatic->office_phone = $obj->office_phone;
@@ -2773,10 +2773,10 @@ while ($i < $imaxinloop) {
$i++; $i++;
} }
// Show total line // Show total line
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
// If no record found // If no record found
if ($num == 0) { if ($num == 0) {
$colspan = 1; $colspan = 1;
foreach ($arrayfields as $key => $val) { foreach ($arrayfields as $key => $val) {
@@ -2787,16 +2787,16 @@ if ($num == 0) {
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>'; print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
} }
$db->free($resql); $db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint; print $hookmanager->resPrint;
print '</table>'."\n"; print '</table>'."\n";
print '</div>'."\n"; print '</div>'."\n";
print '</form>'."\n"; print '</form>'."\n";
if (in_array('builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { if (in_array('builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords === '' || $nbtotalofrecords)) {
$hidegeneratedfilelistifempty = 1; $hidegeneratedfilelistifempty = 1;
@@ -2815,6 +2815,6 @@ if (in_array('builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords
print $formfile->showdocuments('massfilesarea_orders', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); print $formfile->showdocuments('massfilesarea_orders', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
} }
// End of page // End of page
llxFooter(); llxFooter();
$db->close(); $db->close();

View File

@@ -15,7 +15,7 @@ if (isset($totalarray['pos'])) {
while ($i < $totalarray['nbfield']) { while ($i < $totalarray['nbfield']) {
$i++; $i++;
if (!empty($totalarray['pos'][$i])) { if (!empty($totalarray['pos'][$i])) {
printTotalValCell($totalarray['type'][$i], $totalarray['val'][$totalarray['pos'][$i]]); printTotalValCell($totalarray['type'][$i] ?? '', $totalarray['val'][$totalarray['pos'][$i]]);
} else { } else {
if ($i == 1) { if ($i == 1) {
if (is_null($limit) || $num < $limit) { if (is_null($limit) || $num < $limit) {