From b424d395740065af2f060958f659900bbf41e117 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Thu, 11 Oct 2007 22:27:25 +0000 Subject: [PATCH] - added fetchmail.php to menu.tpl (only displayed if $CONF['fetchmail'] == 'YES') - shortened german menu text for fetchmail - config.inc.php: - added $CONF['fetchmail'] and $CONF['fetchmail_extra_options'], including a big warning for the latter one. - include config.inc.php at the end if it exists. This can make future updates easier because you don't have to edit config.inc.php itsself. It should also make development easier because you don't need to undo local changes before commiting config.inc.php - fetchmail.tpl: - new array display_fields, contains the list of fields to display in the table. This also solves most "undefined index" warnings. Note: editing fetchmail does not honor $CONF['fetchmail_extra_options'] = 'NO' yet. git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@151 a1433add-5e2c-0410-b055-b7f2511e0802 --- config.inc.php | 18 +++++++++++++++++ languages/de.lang | 2 +- templates/fetchmail.tpl | 44 +++++++++++++++++++++++++++++++++++------ templates/menu.tpl | 3 +++ 4 files changed, 60 insertions(+), 7 deletions(-) diff --git a/config.inc.php b/config.inc.php index c26ed48c..9530fb6c 100644 --- a/config.inc.php +++ b/config.inc.php @@ -197,6 +197,15 @@ $CONF['sendmail'] = 'YES'; // If you don't want logging set this to 'NO'; $CONF['logging'] = 'YES'; +// Fetchmail +// If you don't want fetchmail tab set this to 'NO'; +$CONF['fetchmail'] = 'YES'; + +// fetchmail_extra_options allows users to specify any fetchmail options and any MDA +// (it will even accept 'rm -rf /' as MDA!) +// This should be set to NO, except if you *really* trust *all* your users. +$CONF['fetchmail_extra_options'] = 'NO'; + // Header $CONF['show_header_text'] = 'NO'; $CONF['header_text'] = ':: Postfix Admin ::'; @@ -299,6 +308,15 @@ $CONF['show_custom_colors']=array("lightgreen","lightblue"); // See also the "Optional flags for names" table at // http://www.php.net/manual/en/function.imap-open.php + +// If you want to keep most settings at default values and/or want to ensure +// that future updates work without problems, you can use a separate config +// file (config.local.php) instead of editing this file and override some +// settings there. +if (file_exists (realpath ("./config.local.php"))) { + include('config.local.php'); +}; + // // END OF CONFIG FILE // diff --git a/languages/de.lang b/languages/de.lang index 679ae376..37ca4f72 100644 --- a/languages/de.lang +++ b/languages/de.lang @@ -29,7 +29,7 @@ $PALANG['pMenu_main'] = 'Startseite'; $PALANG['pMenu_overview'] = 'Überblick'; $PALANG['pMenu_create_alias'] = 'Alias hinzufügen'; $PALANG['pMenu_create_mailbox'] = 'Mailbox hinzufügen'; -$PALANG['pMenu_fetchmail'] = 'E-Mail Abruf bearbeiten'; +$PALANG['pMenu_fetchmail'] = 'E-Mail Abruf'; $PALANG['pMenu_sendmail'] = 'Email versenden'; $PALANG['pMenu_password'] = 'Passwort ändern'; $PALANG['pMenu_viewlog'] = 'Log ansehen'; diff --git a/templates/fetchmail.tpl b/templates/fetchmail.tpl index f2f383cb..234dbcf9 100644 --- a/templates/fetchmail.tpl +++ b/templates/fetchmail.tpl @@ -2,12 +2,41 @@
\n"; - foreach($row as $key=>$val){ + foreach($display_fields as $key){ + list($editible,$view,$type,$title,$comment)=$fm_struct[$key]; + $val = $row[$key]; if ($view){ $func="_listview_".$type; print " " . (function_exists($func)?$func($val):$val) . "\n"; } + } print " \n"; } } - } function fetchmail_edit_row($data=array()){ @@ -153,3 +184,4 @@ function _listview_password($val){

+ diff --git a/templates/menu.tpl b/templates/menu.tpl index 33918484..a11cb15f 100644 --- a/templates/menu.tpl +++ b/templates/menu.tpl @@ -6,6 +6,9 @@
  • + +
  • +