diff options
Diffstat (limited to '')
-rw-r--r-- | Mailman/OldStyleMemberships.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Mailman/OldStyleMemberships.py b/Mailman/OldStyleMemberships.py index 3222c2ae..f28c08db 100644 --- a/Mailman/OldStyleMemberships.py +++ b/Mailman/OldStyleMemberships.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2003 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2007 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 @@ -12,7 +12,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. """Old style Mailman membership adaptor. @@ -201,7 +202,7 @@ class OldStyleMemberships(MemberAdaptor.MemberAdaptor): value = 0 else: value = member - member = member.lower() + member = member.lower() if digest: self.__mlist.digest_members[member] = value else: @@ -243,6 +244,8 @@ class OldStyleMemberships(MemberAdaptor.MemberAdaptor): password = self.__mlist.passwords.get(memberkey, Utils.MakeRandomPassword()) lang = self.getMemberLanguage(memberkey) + delivery = self.__mlist.delivery_status.get(member.lower(), + (MemberAdaptor.ENABLED,0)) # First, possibly delete the old member if not nodelete: self.removeMember(memberkey) @@ -252,6 +255,11 @@ class OldStyleMemberships(MemberAdaptor.MemberAdaptor): # Set the entire options bitfield if flags: self.__mlist.user_options[newaddress.lower()] = flags + # If this is a straightforward address change, i.e. nodelete = 0, + # preserve the delivery status and time if BYUSER or BYADMIN + if delivery[0] in (MemberAdaptor.BYUSER, MemberAdaptor.BYADMIN)\ + and not nodelete: + self.__mlist.delivery_status[newaddress.lower()] = delivery def setMemberPassword(self, memberkey, password): assert self.__mlist.Locked() |