Only show un-conditional forward and autoreply rules in quick links

This commit is contained in:
Jamie Cameron
2010-01-01 11:28:59 -08:00
parent 6c956c8f1f
commit 95bd5a9254
6 changed files with 7 additions and 4 deletions

View File

@@ -26,3 +26,5 @@ Creation of filters that match headers is now less error-prone, due to a new men
When an autoreply is deleted, the underlying message file is deleted too.
---- Changes since 1.420 ----
Autoreply messages starting with <html> or <body> will now be sent using the text/html MIME type.
---- Changes since 1.430 ----
Quick autoreply and forward setup pages now only show un-conditional rules.

View File

@@ -8,7 +8,7 @@ require './filter-lib.pl';
# Get the autoreply filter, if any
@filters = &list_filters();
($filter) = grep { $_->{'actionreply'} } @filters;
($filter) = grep { $_->{'actionreply'} && $_->{'nocond'} } @filters;
$dis = !$filter;
print &ui_form_start("save_auto.cgi", "post");

View File

@@ -8,7 +8,7 @@ require './filter-lib.pl';
# Get the forwarding filter, if any
@filters = &list_filters();
($filter) = grep { $_->{'actiontype'} eq '!' } @filters;
($filter) = grep { $_->{'actiontype'} eq '!' && $_->{'nocond'} } @filters;
$dis = !$filter;
print &ui_form_start("save_forward.cgi", "post");

View File

@@ -105,6 +105,7 @@ foreach my $r (@pmrc) {
# Finally create the simple object
local $simple = { 'condtype' => $condtype,
'cond' => $cond,
'nocond' => !scalar(@{$r->{'conds'}}),
'body' => $flags{'B'},
'continue' => $flags{'c'},
'actiontype' => $r->{'type'},

View File

@@ -9,7 +9,7 @@ require './filter-lib.pl';
# Find existing autoreply filter object
&lock_file($procmail::procmailrc);
@filters = &list_filters();
($old) = grep { $_->{'actionreply'} } @filters;
($old) = grep { $_->{'actionreply'} && $_->{'nocond'} } @filters;
$filter = $old;
if ($filter && !$in{'enabled'}) {

View File

@@ -8,7 +8,7 @@ require './filter-lib.pl';
# Find existing forwarding filter object
&lock_file($procmail::procmailrc);
@filters = &list_filters();
($old) = grep { $_->{'actiontype'} eq '!' } @filters;
($old) = grep { $_->{'actiontype'} eq '!' && $_->{'nocond'} } @filters;
$filter = $old;
if ($filter && !$in{'enabled'}) {