diff roundup/roundupdb.py @ 3877:83748b2de465

Make addition of line about new submission/comment at top of each message... ...configurable Make presence of e-mail address in the added line configurable.
author Erik Forsberg <forsberg@users.sourceforge.net>
date Sat, 01 Sep 2007 16:30:11 +0000
parents 9171e01ac932
children 46ef2a6fd79d
line wrap: on
line diff
--- a/roundup/roundupdb.py	Sat Sep 01 16:14:21 2007 +0000
+++ b/roundup/roundupdb.py	Sat Sep 01 16:30:11 2007 +0000
@@ -16,7 +16,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 #
-# $Id: roundupdb.py,v 1.128 2006-12-18 11:34:41 a1s Exp $
+# $Id: roundupdb.py,v 1.129 2007-09-01 16:30:11 forsberg Exp $
 
 """Extending hyperdb with types specific to issue-tracking.
 """
@@ -292,8 +292,10 @@
             authname = 'admin'
             authaddr = self.db.config.ADMIN_EMAIL
 
-        if authaddr:
+        if authaddr and self.db.config.MAIL_ADD_AUTHOREMAIL:
             authaddr = " <%s>" % straddr( ('',authaddr) )
+        elif authaddr:
+            authaddr = ""
 
         # make the message body
         m = ['']
@@ -303,16 +305,18 @@
             m.append(self.email_signature(nodeid, msgid))
 
         # add author information
-        if authid:
+        if authid and self.db.config.MAIL_ADD_AUTHORINFO:
             if len(self.get(nodeid,'messages')) == 1:
+                
                 m.append(_("New submission from %(authname)s%(authaddr)s:")
                     % locals())
             else:
                 m.append(_("%(authname)s%(authaddr)s added the comment:")
                     % locals())
-        else:
+            m.append('')
+        elif self.db.config.MAIL_ADD_AUTHORINFO:
             m.append(_("System message:"))
-        m.append('')
+            m.append('')
 
         # add the content
         if msgid is not None:

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