aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Cgi/options.py
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2008-03-06 12:34:12 -0800
committerMark Sapiro <mark@msapiro.net>2008-03-06 12:34:12 -0800
commit7858eb837982174b11aec648f3ba4ca0f1ab6c6a (patch)
tree783c50bfa2b4302bfc9625274b8cf2a62b915586 /Mailman/Cgi/options.py
parentdd3ada936da9f0f24f41f113902d35b20e895086 (diff)
downloadmailman2-7858eb837982174b11aec648f3ba4ca0f1ab6c6a.tar.gz
mailman2-7858eb837982174b11aec648f3ba4ca0f1ab6c6a.tar.xz
mailman2-7858eb837982174b11aec648f3ba4ca0f1ab6c6a.zip
CookHeaders.py - Changed the first URL in the RFC 2369 List-Unsubscribe:
header to go to the options login page instead of the listinfo page. options.py - Changed to only issue the "No address given" error if coming from the page itself so we don't get the error when linking from another page or the List-Unsubscribe: header. - Changed to remember the user's language selection when redisplaying the page after an error.
Diffstat (limited to 'Mailman/Cgi/options.py')
-rw-r--r--Mailman/Cgi/options.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/Mailman/Cgi/options.py b/Mailman/Cgi/options.py
index ab19e4e2..67700028 100644
--- a/Mailman/Cgi/options.py
+++ b/Mailman/Cgi/options.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2007 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2008 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
@@ -99,9 +99,11 @@ def main():
user = cgidata.getvalue('email')
if not user:
# If we're coming from the listinfo page and we left the email
- # address field blank, it's not an error. listinfo.html names the
- # button UserOptions; we can use that as the descriminator.
- if not cgidata.getvalue('UserOptions'):
+ # address field blank, it's not an error. Likewise if we're
+ # coming from anywhere else. Only issue the error if we came
+ # via one of our buttons.
+ if (cgidata.getvalue('login') or cgidata.getvalue('login-unsub')
+ or cgidata.getvalue('login-remind')):
doc.addError(_('No address given'))
loginpage(mlist, doc, None, language)
print doc.Format()
@@ -861,6 +863,7 @@ def loginpage(mlist, doc, user, lang):
# Preamble
# Set up the login page
form = Form(actionurl)
+ form.AddItem(Hidden('language', lang))
table = Table(width='100%', border=0, cellspacing=4, cellpadding=5)
table.AddRow([_("""In order to change your membership option, you must
first log in by giving your %(extra)smembership password in the section