1 |
unnilennium |
1.1 |
--- mailman-2.1.5.1/Mailman/Gui/Privacy.py.orig 2007-05-09 10:54:47.000000000 +0200 |
2 |
|
|
+++ mailman-2.1.5.1/Mailman/Gui/Privacy.py 2007-05-09 11:00:27.000000000 +0200 |
3 |
|
|
@@ -429,7 +429,9 @@ |
4 |
|
|
# everything else can be done by the base class's handleForm() method. |
5 |
|
|
# However, to do this we need an awful hack. _setValue() and |
6 |
|
|
# _getValidValue() will essentially ignore any hdrfilter_* form variables. |
7 |
|
|
- def handleForm(self, mlist, category, subcat, cgidata, doc): |
8 |
|
|
+ def _handleForm(self, mlist, category, subcat, cgidata, doc): |
9 |
|
|
+ if not cgidata.has_key('hdrfilter_rebox_01'): |
10 |
|
|
+ return |
11 |
|
|
# First deal with |
12 |
|
|
rules = [] |
13 |
|
|
# We start i at 1 and keep going until we no longer find items keyed |
14 |
|
|
@@ -462,6 +464,9 @@ |
15 |
|
|
break |
16 |
|
|
if cgidata.has_key(newtag) and not pattern: |
17 |
|
|
# This new entry is incomplete. |
18 |
|
|
+ if i == 2: |
19 |
|
|
+ # OK it is the first. |
20 |
|
|
+ continue |
21 |
|
|
doc.addError(_("""Header filter rules require a pattern. |
22 |
|
|
Incomplete filter rules will be ignored.""")) |
23 |
|
|
continue |
24 |
|
|
@@ -506,5 +511,9 @@ |
25 |
|
|
del rules[downi] |
26 |
|
|
rules.insert(downi+1, rule) |
27 |
|
|
mlist.header_filter_rules = rules |
28 |
|
|
+ |
29 |
|
|
+ def handleForm(self, mlist, category, subcat, cgidata, doc): |
30 |
|
|
+ if subcat == 'spam': |
31 |
|
|
+ self._handleForm(mlist, category, subcat, cgidata, doc) |
32 |
|
|
# Everything else is dealt with by the base handler |
33 |
|
|
GUIBase.handleForm(self, mlist, category, subcat, cgidata, doc) |