aboutsummaryrefslogtreecommitdiffstats
path: root/bin/config_list
diff options
context:
space:
mode:
authorbwarsaw <>2003-11-24 23:08:19 +0000
committerbwarsaw <>2003-11-24 23:08:19 +0000
commit750a3542c25bd83ac1ed5cc14c523cecd2cdfbb7 (patch)
tree9c873c0e56c2921d230e0f4edfcd0705b0be2d2d /bin/config_list
parent6dbd0d6787b52d8935ada2d406d98bcebdad7f04 (diff)
downloadmailman2-750a3542c25bd83ac1ed5cc14c523cecd2cdfbb7.tar.gz
mailman2-750a3542c25bd83ac1ed5cc14c523cecd2cdfbb7.tar.xz
mailman2-750a3542c25bd83ac1ed5cc14c523cecd2cdfbb7.zip
do_input(): Kludge around a problem when setting new_member_options
via config_list. This one sucks because new_member_options is a Checkbox but the standard way of setting and getting these values doesn't really work. Fixes SF # 841445.
Diffstat (limited to 'bin/config_list')
-rw-r--r--bin/config_list11
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/config_list b/bin/config_list
index 9675e142..3ed1bc6c 100644
--- a/bin/config_list
+++ b/bin/config_list
@@ -1,6 +1,6 @@
#! @PYTHON@
#
-# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2003 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
@@ -283,6 +283,15 @@ def do_input(listname, infile, checkonly, verbose):
if k == 'subscribe_policy' and \
not mm_cfg.ALLOW_OPEN_SUBSCRIBE:
validval -= 1
+ # BAW: Another horrible hack. This one is just too hard
+ # to fix in a principled way in Mailman 2.1
+ elif k == 'new_member_options':
+ # Because this is a Checkbox, _getValidValue()
+ # transforms the value into a list of one item.
+ validval = validval[0]
+ validval = [bitfield for bitfield, bitval
+ in mm_cfg.OPTINFO.items()
+ if validval & bitval]
gui._setValue(mlist, k, validval, fakedoc)
# BAW: when to do gui._postValidate()???
finally: