- 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
postfixadmin-2.3
Christian Boltz 18 years ago
parent 1e5b4c31c0
commit dc73789c56

@ -1,39 +1,10 @@
<?php
# fields to display in table view
$display_fields=array(
"id",
"mailbox",
"src_server",
"src_auth",
"src_user",
# "src_password",
"src_folder",
"pool_time",
"fetchall",
"keep",
"protocol",
);
if ($CONF['fetchmail_extra_options'] == 'YES') {
array_push(
$display_fields,
"extra_options",
"mda"
);
}
array_push(
$display_fields,
"date",
"returned_text"
);
$headers=array();
foreach($display_fields as $row){
list($editible,$view,$type,$title,$comment)=$fm_struct[$row];
foreach($fm_struct as $row){
list($editible,$view,$type,$title,$comment)=$row;
if ($view){
$headers[]=$fm_struct[$row];
$headers[]=$row;
}
}
@ -71,10 +42,10 @@ if ($edit) { # edit mode
# }
# else{
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\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 " <td nowrap>" . (function_exists($func)?$func($val):$val) . "</td>\n";

Loading…
Cancel
Save