comparison roundup/cgi/client.py @ 1830:4ac11e7fa11a

Fix mailer bug [SF#817470]... ...and add docstrings to prevent this from happening again.
author Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
date Sat, 04 Oct 2003 11:21:47 +0000
parents 85fd3d0e7d81
children 7c84534aec13
comparison
equal deleted inserted replaced
1829:4e4afbe3cd30 1830:4ac11e7fa11a
1 # $Id: client.py,v 1.140 2003-09-24 14:53:58 jlgijsbers Exp $ 1 # $Id: client.py,v 1.141 2003-10-04 11:21:47 jlgijsbers Exp $
2 2
3 __doc__ = """ 3 __doc__ = """
4 WWW request handler (also used in the stand-alone server). 4 WWW request handler (also used in the stand-alone server).
5 """ 5 """
6 6
771 - or visit the following URL: 771 - or visit the following URL:
772 772
773 %(url)s?@action=confrego&otk=%(otk)s 773 %(url)s?@action=confrego&otk=%(otk)s
774 """ % {'name': props['username'], 'tracker': tracker_name, 'url': self.base, 774 """ % {'name': props['username'], 'tracker': tracker_name, 'url': self.base,
775 'otk': otk, 'tracker_email': tracker_email} 775 'otk': otk, 'tracker_email': tracker_email}
776 if not self.standard_message(props['address'], subject, body, 776 if not self.standard_message([props['address']], subject, body,
777 tracker_email): 777 tracker_email):
778 return 778 return
779 779
780 # commit changes to the database 780 # commit changes to the database
781 self.db.commit() 781 self.db.commit()
876 body = ''' 876 body = '''
877 The password has been reset for username "%(name)s". 877 The password has been reset for username "%(name)s".
878 878
879 Your password is now: %(password)s 879 Your password is now: %(password)s
880 '''%{'name': name, 'password': newpw} 880 '''%{'name': name, 'password': newpw}
881 if not self.standard_message(address, subject, body): 881 if not self.standard_message([address], subject, body):
882 return 882 return
883 883
884 self.ok_message.append('Password reset and email sent to %s'%address) 884 self.ok_message.append('Password reset and email sent to %s'%address)
885 return 885 return
886 886
919 919
920 %(url)suser?@template=forgotten&@action=passrst&otk=%(otk)s 920 %(url)suser?@template=forgotten&@action=passrst&otk=%(otk)s
921 921
922 You should then receive another email with the new password. 922 You should then receive another email with the new password.
923 '''%{'name': name, 'tracker': tracker_name, 'url': self.base, 'otk': otk} 923 '''%{'name': name, 'tracker': tracker_name, 'url': self.base, 'otk': otk}
924 if not self.standard_message(address, subject, body): 924 if not self.standard_message([address], subject, body):
925 return 925 return
926 926
927 self.ok_message.append('Email sent to %s'%address) 927 self.ok_message.append('Email sent to %s'%address)
928 928
929 def editItemAction(self): 929 def editItemAction(self):

Roundup Issue Tracker: http://roundup-tracker.org/