r421@erker: lars | 2008-09-28 17:39:44 +0200

web interface code:
 * improve some input tests
 * fix perl warning during list deletion
This commit is contained in:
lars 2008-09-29 20:44:50 +00:00
parent d12f1e716f
commit c24e5ea00e

View file

@ -429,9 +429,17 @@ if (defined($action) && ($action eq 'show_mime_examples')) {
$pagename = 'list_select'; $pagename = 'list_select';
} }
} elsif ($FEATURES{GPGEZMLM} && ($action eq 'gpgezmlm_convert_ask')) { } elsif ($FEATURES{GPGEZMLM} && ($action eq 'gpgezmlm_convert_ask')) {
$pagename = 'gpgezmlm_convert'; if ($list) {
$pagename = 'gpgezmlm_convert';
} else {
$pagename = 'list_select';
$error = 'ParameterMissing';
}
} elsif ($FEATURES{GPGEZMLM} && ($action eq 'gpgezmlm_convert_enable')) { } elsif ($FEATURES{GPGEZMLM} && ($action eq 'gpgezmlm_convert_enable')) {
if (ref($list) && $list->isa("Mail::Ezmlm::GpgEzmlm")) { if (!defined($list)) {
$pagename = 'list_select';
$error = 'ParameterMissing';
} elsif (ref($list) && $list->isa("Mail::Ezmlm::GpgEzmlm")) {
$pagename = 'gpgezmlm_convert'; $pagename = 'gpgezmlm_convert';
$warning = 'GpgEzmlmConvertAlreadyEnabled'; $warning = 'GpgEzmlmConvertAlreadyEnabled';
} else { } else {
@ -454,9 +462,13 @@ if (defined($action) && ($action eq 'show_mime_examples')) {
} }
} }
} elsif ($FEATURES{GPGEZMLM} && ($action eq 'gpgezmlm_convert_disable')) { } elsif ($FEATURES{GPGEZMLM} && ($action eq 'gpgezmlm_convert_disable')) {
if ($list && $list->isa("Mail::Ezmlm::GpgEzmlm")) { if (!defined($list)) {
if ($list->convert_to_plaintext()) { $pagename = 'list_select';
$list = $_; $error = 'ParameterMissing';
} elsif ($list->isa("Mail::Ezmlm::GpgEzmlm")) {
my $plain_list = $list->convert_to_plaintext();
if ($plain_list) {
$list = $plain_list;
$pagename = 'gpgezmlm_convert'; $pagename = 'gpgezmlm_convert';
$success = 'GpgEzmlmConvertDisable'; $success = 'GpgEzmlmConvertDisable';
} else { } else {
@ -1446,7 +1458,7 @@ sub get_dotqmail_files {
# get list of existing files (remove empty entries) # get list of existing files (remove empty entries)
@files = grep {/./} map @files = grep {/./} map
{ (-e "$qmail_prefix$_")? "$qmail_prefix$_" : undef } ( { (-e "$qmail_prefix$_")? "$qmail_prefix$_" : '' } (
'', '',
'-default', '-default',
'-owner', '-owner',