- 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
postfixadmin-2.3
Christian Boltz 17 years ago
parent ba6ae2a311
commit b424d39574

@ -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
//

@ -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';

@ -3,11 +3,40 @@
<?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($fm_struct as $row){
list($editible,$view,$type,$title,$comment)=$row;
foreach($display_fields as $row){
list($editible,$view,$type,$title,$comment)=$fm_struct[$row];
if ($view){
$headers[]=$row;
$headers[]=$fm_struct[$row];
}
}
@ -30,17 +59,19 @@
}
else{
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\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 " <td nowrap>" . (function_exists($func)?$func($val):$val) . "</td>\n";
}
}
print " </tr>\n";
}
}
}
function fetchmail_edit_row($data=array()){
@ -153,3 +184,4 @@ function _listview_password($val){
<p />
</form>
</div>
<?php /* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?>

@ -6,6 +6,9 @@
<li><a target="_top" href="<?php print $url; ?>"><?php print $PALANG['pMenu_create_alias']; ?></a></li>
<?php $url = "create-mailbox.php"; if (isset ($_GET['domain'])) $url .= "?domain=" . $_GET['domain']; ?>
<li><a target="_top" href="<?php print $url; ?>"><?php print $PALANG['pMenu_create_mailbox']; ?></a></li>
<?php if ($CONF['fetchmail'] == "YES") { ?>
<li><a target="_top" href="fetchmail.php"><?php print $PALANG['pMenu_fetchmail']; ?></a></li>
<?php } ?>
<?php if ($CONF['sendmail'] == 'YES') { ?><li><a target="_top" href="sendmail.php"><?php print $PALANG['pMenu_sendmail']; ?></a></li><?php } ?>
<?php if ($CONF['vacation'] == "YES") { ?>
<li><a target="_top" href="edit-vacation.php"><?php print $PALANG['pUsersMenu_vacation']; ?></a></li>

Loading…
Cancel
Save