------------------------------------------------------------
revno: 1055
committer: Mark Sapiro <[EMAIL PROTECTED]>
branch nick: 2.1
timestamp: Thu 2008-03-06 12:34:12 -0800
message:
  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.
modified:
  Mailman/Cgi/options.py
  Mailman/Handlers/CookHeaders.py
  NEWS

=== modified file 'Mailman/Cgi/options.py'
--- a/Mailman/Cgi/options.py    2007-11-04 23:03:38 +0000
+++ b/Mailman/Cgi/options.py    2008-03-06 20:34:12 +0000
@@ -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 @@
         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 @@
     # 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

=== modified file 'Mailman/Handlers/CookHeaders.py'
--- a/Mailman/Handlers/CookHeaders.py   2006-02-17 02:42:35 +0000
+++ b/Mailman/Handlers/CookHeaders.py   2008-03-06 20:34:12 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2005 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
@@ -199,13 +199,14 @@
     requestaddr = mlist.GetRequestEmail()
     subfieldfmt = '<%s>, <mailto:%s?subject=%ssubscribe>'
     listinfo = mlist.GetScriptURL('listinfo', absolute=1)
+    useropts = mlist.GetScriptURL('options', absolute=1)
     headers = {}
     if msgdata.get('reduced_list_headers'):
         headers['X-List-Administrivia'] = 'yes'
     else:
         headers.update({
             'List-Help'       : '<mailto:%s?subject=help>' % requestaddr,
-            'List-Unsubscribe': subfieldfmt % (listinfo, requestaddr, 'un'),
+            'List-Unsubscribe': subfieldfmt % (useropts, requestaddr, 'un'),
             'List-Subscribe'  : subfieldfmt % (listinfo, requestaddr, ''),
             })
         # List-Post: is controlled by a separate attribute

=== modified file 'NEWS'
--- a/NEWS      2008-03-03 18:06:28 +0000
+++ b/NEWS      2008-03-06 20:34:12 +0000
@@ -162,6 +162,14 @@
       available_languages if it is other than the server's default language
       (1906368).
 
+    - Changed the first URL in the RFC 2369 List-Unsubscribe: header to go
+      to the options login page instead of the listinfo page.
+
+    - Changed the options login page to not issue the "No address given" error
+      when coming from the List-Unsubscribe and other direct links.  Also
+      changed to remember the user's language selection when redisplaying the
+      page following an error.
+
   Miscellaneous
 
     - Brad Knowles' mailman daily status report script updated to 0.0.17.



--
Stable, maintained release series
https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to