~pahuja-anuj/systers/systers

« back to all changes in this revision

Viewing changes to Mailman/ListAdmin.py

  • Committer: Robin Jeffries
  • Date: 2009-01-15 17:40:58 UTC
  • Revision ID: robin@abiwt.org-20090115174058-4pg2mw7mocmobhco
fixed comments to be more clear about relationship to dlist.  Removed some debugging statements

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
from Mailman import Message
41
41
from Mailman import Errors
42
42
 
43
 
from Mailman.DlistUserDesc import DlistUserDesc #updated to use Dlists
 
43
from Mailman.DlistUserDesc import DlistUserDesc #enable support for subscribe essays
44
44
from Mailman.Queue.sbcache import get_switchboard
45
45
from Mailman.Logging.Syslog import syslog
46
46
from Mailman import i18n
364
364
                return LOST
365
365
        return status
366
366
 
367
 
    def HoldSubscription(self, addr, fullname, password, digest, lang, essay): #Ellen added essay
 
367
    def HoldSubscription(self, addr, fullname, password, digest, lang, essay): #added support for essays
368
368
        # Assure that the database is open for writing
369
369
        self.__opendb()
370
370
        # Get the next unique id
378
378
        # the subscriber's selected password (TBD: is this safe???)
379
379
        # the digest flag
380
380
        # the user's preferred language
381
 
        # the subscription information essay (part of Dlists)
382
 
        data = time.time(), addr, fullname, password, digest, lang, essay # Ellen added essay
 
381
        # the subscription information essay (for lists that require this)
 
382
        data = time.time(), addr, fullname, password, digest, lang, essay # added support for essays
383
383
        self.__db[id] = (SUBSCRIPTION, data)
384
384
        #
385
385
        # TBD: this really shouldn't go here but I'm not sure where else is
386
386
        # appropriate.
387
387
        syslog('vette', '%s: held subscription request from %s',
388
388
               self.internal_name(), addr)
389
 
        syslog('info', "name of db = %s", self.__filename)
390
389
        # Possibly notify the administrator in default list language
391
390
        if self.admin_immed_notify:
392
391
            realname = self.real_name
407
406
            msg.send(self, **{'tomoderators': 1})
408
407
 
409
408
    def __handlesubscription(self, record, value, comment):
410
 
        stime, addr, fullname, password, digest, lang, essay=record # Ellen added essay
 
409
        stime, addr, fullname, password, digest, lang, essay=record # added support for essays
411
410
        if value == mm_cfg.DEFER:
412
411
            return DEFER
413
412
        elif value == mm_cfg.DISCARD:
420
419
            # subscribe
421
420
            assert value == mm_cfg.SUBSCRIBE
422
421
            try:
423
 
                userdesc = DlistUserDesc(addr, fullname, password, digest, lang, essay) #Ellen added essay
 
422
                userdesc = DlistUserDesc(addr, fullname, password, digest, lang, essay) #added support for essays
424
423
                self.ApprovedAddMember(userdesc, whence='via admin approval')
425
424
            except Errors.MMAlreadyAMember:
426
425
                # User has already been subscribed, after sending the request