comparison roundup/roundupdb.py @ 3515:7015c1961013

have "System Messages" be marked as such again [SF#1281907]
author Richard Jones <richard@users.sourceforge.net>
date Fri, 27 Jan 2006 02:39:42 +0000
parents 0c78c9bbb542
children f607494f5578
comparison
equal deleted inserted replaced
3514:6b38c62510ea 3515:7015c1961013
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.120 2005-12-25 16:20:02 a1s Exp $ 18 # $Id: roundupdb.py,v 1.121 2006-01-27 02:39:42 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
178 The "bcc" argument also indicates additional recipients to send the 178 The "bcc" argument also indicates additional recipients to send the
179 message to that may not be specified in the message's recipients 179 message to that may not be specified in the message's recipients
180 list. These recipients will not be included in the To: or Cc: 180 list. These recipients will not be included in the To: or Cc:
181 address lists. 181 address lists.
182 """ 182 """
183 if msgid is None: 183 if msgid:
184 authid = '1'
185 recipients = []
186 else:
187 authid = self.db.msg.get(msgid, 'author') 184 authid = self.db.msg.get(msgid, 'author')
188 recipients = self.db.msg.get(msgid, 'recipients', []) 185 recipients = self.db.msg.get(msgid, 'recipients', [])
186 else:
187 # "system message"
188 authid = None
189 recipients = []
189 190
190 sendto = [] 191 sendto = []
191 bcc_sendto = [] 192 bcc_sendto = []
192 seen_message = {} 193 seen_message = {}
193 for recipient in recipients: 194 for recipient in recipients:
272 # compose title 273 # compose title
273 cn = self.classname 274 cn = self.classname
274 title = self.get(nodeid, 'title') or '%s message copy'%cn 275 title = self.get(nodeid, 'title') or '%s message copy'%cn
275 276
276 # figure author information 277 # figure author information
277 if msgid is None: 278 if msgid:
278 authid = '1'
279 authname = 'admin'
280 else:
281 authid = messages.get(msgid, 'author') 279 authid = messages.get(msgid, 'author')
282 authname = users.get(authid, 'realname') 280 authname = users.get(authid, 'realname')
283 if not authname: 281 if not authname:
284 authname = users.get(authid, 'username', '') 282 authname = users.get(authid, 'username', '')
285 authaddr = users.get(authid, 'address', '') 283 authaddr = users.get(authid, 'address', '')
284 else:
285 # "system message"
286 authid = None
287 authname = 'admin'
288 authaddr = self.db.config.ADMIN_EMAIL
289
286 if authaddr: 290 if authaddr:
287 authaddr = " <%s>" % straddr( ('',authaddr) ) 291 authaddr = " <%s>" % straddr( ('',authaddr) )
288 292
289 # make the message body 293 # make the message body
290 m = [''] 294 m = ['']

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