diff options
author | Mark Sapiro <msapiro@value.net> | 2011-10-04 14:53:13 -0700 |
---|---|---|
committer | Mark Sapiro <msapiro@value.net> | 2011-10-04 14:53:13 -0700 |
commit | 9d25bddb18f6bee573e3077c9429394d6bc609cf (patch) | |
tree | 4e86d935cd82011fee921c8f7462594309696851 | |
parent | d95db9c7a7e6369546dd00e74feeaf02603333d4 (diff) | |
download | mailman2-9d25bddb18f6bee573e3077c9429394d6bc609cf.tar.gz mailman2-9d25bddb18f6bee573e3077c9429394d6bc609cf.tar.xz mailman2-9d25bddb18f6bee573e3077c9429394d6bc609cf.zip |
- Mailman/Gui/General.py
Fixed the setting of new_member_options so that unprocessed bits are not
changed. Augmented the logic so that bin/config_list can set or reset
any bits in mm_cfg.OPTINFO. Bug #865825.
- Mailman/Defaulys.py.in
Added missing bits to OPTINFO.
-rw-r--r-- | Mailman/Defaults.py.in | 3 | ||||
-rw-r--r-- | Mailman/Gui/General.py | 18 | ||||
-rw-r--r-- | NEWS | 5 |
3 files changed, 23 insertions, 3 deletions
diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in index 72d67723..14321e99 100644 --- a/Mailman/Defaults.py.in +++ b/Mailman/Defaults.py.in @@ -1389,6 +1389,9 @@ OPTINFO = {'hide' : ConcealSubscription, 'notmetoo': DontReceiveOwnPosts, 'digest' : 0, 'plain' : DisableMime, + 'noremind': SuppressPasswordReminder, + 'nmtopics': ReceiveNonmatchingTopics, + 'mod' : Moderate, 'nodupes' : DontReceiveDuplicates } diff --git a/Mailman/Gui/General.py b/Mailman/Gui/General.py index b398bc92..e9f8f9b5 100644 --- a/Mailman/Gui/General.py +++ b/Mailman/Gui/General.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2010 by the Free Software Foundation, Inc. +# Copyright (C) 2001-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 @@ -25,6 +25,7 @@ from Mailman import mm_cfg from Mailman import Utils from Mailman import Errors from Mailman.i18n import _ +from Mailman.htmlformat import Document from Mailman.Gui.GUIBase import GUIBase OPTIONS = ('hide', 'ack', 'notmetoo', 'nodupes') @@ -455,11 +456,22 @@ class General(GUIBase): changed! It must differ from the list's name by case only.""")) elif property == 'new_member_options': - newopts = 0 - for opt in OPTIONS: + # Get current value because there are valid bits not in OPTIONS. + # If we're the admin CGI, we then process the bits in OPTIONS, + # turning them on or off as appropriate. Otherwise we process all + # the bits in mm_cfg.OPTINFO so that config_list can set and reset + # them. + newopts = mlist.new_member_options + if isinstance(doc, Document): + opts = OPTIONS + else: + opts = mm_cfg.OPTINFO + for opt in opts: bitfield = mm_cfg.OPTINFO[opt] if opt in val: newopts |= bitfield + else: + newopts &= ~bitfield mlist.new_member_options = newopts elif property == 'subject_prefix': # Convert any html entities to Unicode @@ -71,6 +71,11 @@ Here is a history of user visible changes to Mailman. Bug Fixes and other patches + - A bug that would cause reset of any new_member_options bits other than + the four displayed as checkboxes on the list admin General Options page + whenever the page was updated or bin/config_list attempted to update + new_member_options has been fixed. Bug #865825. + - A problem with the logic avoiding unnecessarily reloading a current list object from the config.pck arises if the list is updated by another process within the same second that it was last read/written. That can |