diff options
author | Mark Sapiro <msapiro@value.net> | 2012-08-22 20:58:18 -0700 |
---|---|---|
committer | Mark Sapiro <msapiro@value.net> | 2012-08-22 20:58:18 -0700 |
commit | baa86ef21a9a242ed61e99547716ed7b3b12a7df (patch) | |
tree | 7a3a0063ca3a71f9e8b7845d343dadcc7c41de42 /Mailman | |
parent | 4273c882778267730a0a90ca1f0006c8a04d02d4 (diff) | |
download | mailman2-baa86ef21a9a242ed61e99547716ed7b3b12a7df.tar.gz mailman2-baa86ef21a9a242ed61e99547716ed7b3b12a7df.tar.xz mailman2-baa86ef21a9a242ed61e99547716ed7b3b12a7df.zip |
The query fragments send_unsub_notifications_to_list_owner and
send_unsub_ack_to_this_batch will now assume default values if not set
in mass unsubscribe URLs. (LP: #1032378)
Diffstat (limited to 'Mailman')
-rw-r--r-- | Mailman/Cgi/admin.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Mailman/Cgi/admin.py b/Mailman/Cgi/admin.py index f3284e17..a1bc8606 100644 --- a/Mailman/Cgi/admin.py +++ b/Mailman/Cgi/admin.py @@ -1436,10 +1436,12 @@ def change_options(mlist, category, subcat, cgidata, doc): removals += cgidata['unsubscribees_upload'].value if removals: names = filter(None, [n.strip() for n in removals.splitlines()]) - send_unsub_notifications = int( - cgidata['send_unsub_notifications_to_list_owner'].value) - userack = int( - cgidata['send_unsub_ack_to_this_batch'].value) + send_unsub_notifications = safeint( + 'send_unsub_notifications_to_list_owner', + mlist.admin_notify_mchanges) + userack = safeint( + 'send_unsub_ack_to_this_batch', + mlist.send_goodbye_msg) unsubscribe_errors = [] unsubscribe_success = [] for addr in names: @@ -1463,11 +1465,7 @@ def change_options(mlist, category, subcat, cgidata, doc): doc.AddItem('<p>') # See if this was a moderation bit operation if cgidata.has_key('allmodbit_btn'): - val = cgidata.getvalue('allmodbit_val') - try: - val = int(val) - except VallueError: - val = None + val = safeint('allmodbit_val') if val not in (0, 1): doc.addError(_('Bad moderation flag value')) else: |