diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index 4453f2d8302..7053486234f 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -2,6 +2,7 @@ /* Copyright (C) 2007-2016 Laurent Destailleur * Copyright (C) 2014-2016 Juanjo Menent * Copyright (C) 2016 Jean-François Ferry + * Copyright (C) 2017 Nicolas ZABOURI * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -440,17 +441,14 @@ while ($i < min($num, $limit)) // Show here line of result print ''; // LIST_OF_TD_FIELDS_LIST - /* - if (! empty($arrayfields['t.field1']['checked'])) - { - print ''.$obj->field1.''; - if (! $i) $totalarray['nbfield']++; + foreach ($arrayfields as $key => $value) { + if (!empty($arrayfields[$key]['checked'])) { + $key2 = str_replace('t.', '', $key); + print '' . $obj->$key2 . ''; + if (!$i) + $totalarray['nbfield'] ++; + } } - if (! empty($arrayfields['t.field2']['checked'])) - { - print ''.$obj->field2.''; - if (! $i) $totalarray['nbfield']++; - }*/ // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) {