From 750a3542c25bd83ac1ed5cc14c523cecd2cdfbb7 Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Mon, 24 Nov 2003 23:08:19 +0000 Subject: 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. --- bin/config_list | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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: -- cgit v1.2.3