SF.net SVN: postfixadmin: [161] trunk/templates/fetchmail.tpl
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2007-10-23 00:18:50
|
Revision: 161 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=161&view=rev Author: christian_boltz Date: 2007-10-22 17:18:52 -0700 (Mon, 22 Oct 2007) Log Message: ----------- - 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) Modified Paths: -------------- trunk/templates/fetchmail.tpl Modified: trunk/templates/fetchmail.tpl =================================================================== --- trunk/templates/fetchmail.tpl 2007-10-23 00:01:31 UTC (rev 160) +++ trunk/templates/fetchmail.tpl 2007-10-23 00:18:52 UTC (rev 161) @@ -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 @@ # } # 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"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |