From dc73789c56508dd9d7c129b43e3dd6bd59640e88 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Tue, 23 Oct 2007 00:18:52 +0000 Subject: [PATCH] - reverted most changes from r151 in fetchmail.tpl, especially: - removed $display_fields array again after understanding how $fm_struct in fetchmail.php works - added workaround for undefined index warnings in $fm_struct (line 47) (for whatever reasons, there seem to be both numeric and named keys) git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@161 a1433add-5e2c-0410-b055-b7f2511e0802 --- templates/fetchmail.tpl | 41 ++++++----------------------------------- 1 file changed, 6 insertions(+), 35 deletions(-) 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";