diff --git a/templates/fetchmail.tpl b/templates/fetchmail.tpl index 21d1dc84..d0a26d74 100644 --- a/templates/fetchmail.tpl +++ b/templates/fetchmail.tpl @@ -1,39 +1,10 @@ \n"; - foreach($display_fields as $key){ + foreach($row as $key=>$val){ - list($editible,$view,$type,$title,$comment)=$fm_struct[$key]; - $val = $row[$key]; + if (!isset($fm_struct[$key])) continue; # TODO: not really nice, but avoids undefined index warnings ;-) + list($editible,$view,$type,$title,$comment)=$fm_struct[$key]; if ($view){ $func="_listview_".$type; print " " . (function_exists($func)?$func($val):$val) . "\n";