Mercurial > p > roundup > code
comparison roundup/roundupdb.py @ 2073:261c2e6ceb1e
*** empty log message ***
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 05 Mar 2004 00:08:09 +0000 |
| parents | 48600089c73d |
| children | 3e0961d6d44d |
comparison
equal
deleted
inserted
replaced
| 2069:d8c7fd205cd8 | 2073:261c2e6ceb1e |
|---|---|
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # $Id: roundupdb.py,v 1.99 2004-02-29 00:35:55 richard Exp $ | 18 # $Id: roundupdb.py,v 1.100 2004-03-05 00:08:09 richard Exp $ |
| 19 | 19 |
| 20 """Extending hyperdb with types specific to issue-tracking. | 20 """Extending hyperdb with types specific to issue-tracking. |
| 21 """ | 21 """ |
| 22 __docformat__ = 'restructuredtext' | 22 __docformat__ = 'restructuredtext' |
| 23 | 23 |
| 147 # make sure they have an address | 147 # make sure they have an address |
| 148 address = self.db.user.get(userid, 'address') | 148 address = self.db.user.get(userid, 'address') |
| 149 if address: | 149 if address: |
| 150 sendto.append(address) | 150 sendto.append(address) |
| 151 recipients.append(userid) | 151 recipients.append(userid) |
| 152 | 152 |
| 153 def good_recipient(userid): | 153 def good_recipient(userid): |
| 154 # Make sure we don't send mail to either the anonymous | 154 # Make sure we don't send mail to either the anonymous |
| 155 # user or a user who has already seen the message. | 155 # user or a user who has already seen the message. |
| 156 return (userid and | 156 return (userid and |
| 157 (self.db.user.get(userid, 'username') != 'anonymous') and | 157 (self.db.user.get(userid, 'username') != 'anonymous') and |
| 158 not seen_message.has_key(userid)) | 158 not seen_message.has_key(userid)) |
| 159 | 159 |
| 160 # possibly send the message to the author, as long as they aren't | 160 # possibly send the message to the author, as long as they aren't |
| 161 # anonymous | 161 # anonymous |
| 162 if (good_recipient(authid) and | 162 if (good_recipient(authid) and |
| 163 (self.db.config.MESSAGES_TO_AUTHOR == 'yes' or | 163 (self.db.config.MESSAGES_TO_AUTHOR == 'yes' or |
| 164 (self.db.config.MESSAGES_TO_AUTHOR == 'new' and not oldvalues))): | 164 (self.db.config.MESSAGES_TO_AUTHOR == 'new' and not oldvalues))): |
