Skip to content

Commit a4faffd

Browse files
author
Richard Jones
committed
have "System Messages" be marked as such again [SF#1281907]
1 parent 3d83074 commit a4faffd

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Fixed:
4343
- default user template does not display password fields and submit button
4444
when editing is not allowed
4545
- fix StructuredText import in cgi.templating
46+
- have "System Messages" be marked as such again (sf bug 1281907)
4647

4748

4849
2005-10-07 0.9.0b1

roundup/roundupdb.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
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 $
1919

2020
"""Extending hyperdb with types specific to issue-tracking.
2121
"""
@@ -180,12 +180,13 @@ def nosymessage(self, nodeid, msgid, oldvalues, whichnosy='nosy',
180180
list. These recipients will not be included in the To: or Cc:
181181
address lists.
182182
"""
183-
if msgid is None:
184-
authid = '1'
185-
recipients = []
186-
else:
183+
if msgid:
187184
authid = self.db.msg.get(msgid, 'author')
188185
recipients = self.db.msg.get(msgid, 'recipients', [])
186+
else:
187+
# "system message"
188+
authid = None
189+
recipients = []
189190

190191
sendto = []
191192
bcc_sendto = []
@@ -274,15 +275,18 @@ def send_message(self, nodeid, msgid, note, sendto, from_address=None,
274275
title = self.get(nodeid, 'title') or '%s message copy'%cn
275276

276277
# figure author information
277-
if msgid is None:
278-
authid = '1'
279-
authname = 'admin'
280-
else:
278+
if msgid:
281279
authid = messages.get(msgid, 'author')
282280
authname = users.get(authid, 'realname')
283-
if not authname:
284-
authname = users.get(authid, 'username', '')
285-
authaddr = users.get(authid, 'address', '')
281+
if not authname:
282+
authname = users.get(authid, 'username', '')
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+
286290
if authaddr:
287291
authaddr = " <%s>" % straddr( ('',authaddr) )
288292

0 commit comments

Comments
 (0)