Merge pull request #12354 from frederic34/patch-18

Update list.php
This commit is contained in:
Laurent Destailleur 2019-11-07 11:41:33 +01:00 committed by GitHub
commit 92fa184701
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,7 @@ if (!$user->rights->opensurvey->read) accessforbidden();
// Definition of fields for list
$arrayfields=array();
foreach($object->fields as $key => $val)
foreach($arrayfields as $key => $val)
{
// If $val['visible']==0, then we never show the field
if (! empty($val['visible'])) $arrayfields['t.'.$key]=array('label'=>$val['label'], 'checked'=>(($val['visible']<0)?0:1), 'enabled'=>$val['enabled'], 'position'=>$val['position']);
@ -444,7 +444,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
// If no record found
if ($num == 0)
{
$colspan=1;
$colspan = 8;
foreach($arrayfields as $key => $val) { if (! empty($val['checked'])) $colspan++; }
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
}