aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <msapiro@value.net>2011-11-13 13:32:08 -0800
committerMark Sapiro <msapiro@value.net>2011-11-13 13:32:08 -0800
commit727b7288718ad81c658517d08338c07a22dd1793 (patch)
treea7a78e5eaaeaafc4a7426390ee8c16d2f2de5c4f
parent1e179126faa8025e0c1d758c0b035f6b0c506e4a (diff)
downloadmailman2-727b7288718ad81c658517d08338c07a22dd1793.tar.gz
mailman2-727b7288718ad81c658517d08338c07a22dd1793.tar.xz
mailman2-727b7288718ad81c658517d08338c07a22dd1793.zip
Fixed misleading response to an email approval of a held message.
Bug #889968.
-rw-r--r--Mailman/Commands/cmd_confirm.py17
-rw-r--r--Mailman/MailList.py2
-rw-r--r--NEWS3
3 files changed, 18 insertions, 4 deletions
diff --git a/Mailman/Commands/cmd_confirm.py b/Mailman/Commands/cmd_confirm.py
index 9d568df2..a3accf64 100644
--- a/Mailman/Commands/cmd_confirm.py
+++ b/Mailman/Commands/cmd_confirm.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2005 by the Free Software Foundation, Inc.
+# Copyright (C) 2002-2011 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -84,14 +84,25 @@ Bad approval password given. Held message is still being held."""))
# We don't also need to send a confirmation succeeded message
res.respond = 0
else:
- res.results.append(_('Confirmation succeeded'))
+ if results[0] == Pending.HELD_MESSAGE:
+ if results[1] == mm_cfg.APPROVE:
+ res.results.append(_('Confirmation succeeded') +
+ ' (' + _('Approve') + ')')
+ else:
+ res.results.append(_('Confirmation succeeded') +
+ ' (' + _('Discard') + ')')
+ else:
+ res.results.append(_('Confirmation succeeded'))
# Consume any other confirmation strings with the same cookie so
# the user doesn't get a misleading "unprocessed" message.
+ # Also consume any Approve(d): line as it was processed.
match = 'confirm ' + cookie
unprocessed = []
for line in res.commands:
try:
- if line.lstrip() == match:
+ if (line.lstrip() == match or
+ line.lstrip().lower().startswith('approved:') or
+ line.lstrip().lower().startswith('approve:')):
continue
except UnicodeError:
pass
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index 0e9ac390..63a5b81e 100644
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -1302,7 +1302,7 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
# Most likely because the message has already been disposed of
# via the admindb page.
syslog('error', 'Could not process HELD_MESSAGE: %s', id)
- return (op,)
+ return op, action
elif op == Pending.RE_ENABLE:
member = data[1]
self.setDeliveryStatus(member, MemberAdaptor.ENABLED)
diff --git a/NEWS b/NEWS
index f1485883..37d9348a 100644
--- a/NEWS
+++ b/NEWS
@@ -71,6 +71,9 @@ Here is a history of user visible changes to Mailman.
Bug Fixes and other patches
+ - Fixed misleading response to an email approval of a held message.
+ Bug #889968.
+
- Added masthead.txt to the list of templates that can be edited via the
web admin interface. Bug #266805.