From 5a24beed0c96b868c45966260dedb9d73b19710b Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 17 Feb 2003 06:45:38 +0000 Subject: [PATCH] rfc2822-ify the tracker name in mail headers git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1517 57a73879-2fb5-44c3-a270-3262357dd7e2 --- doc/upgrading.txt | 3 +++ roundup/rfc2822.py | 1 - roundup/roundupdb.py | 11 ++++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/upgrading.txt b/doc/upgrading.txt index 85dbe8d..8b72223 100644 --- a/doc/upgrading.txt +++ b/doc/upgrading.txt @@ -28,6 +28,9 @@ Migrating from 0.5 to 0.6 XXX Form handling changed significantly! Document it! +lose :multilink +name:confirm -> :confirm:name + 0.6.0 Multilingual character set support ---------------------------------------- diff --git a/roundup/rfc2822.py b/roundup/rfc2822.py index 7cee715..d601ee1 100644 --- a/roundup/rfc2822.py +++ b/roundup/rfc2822.py @@ -122,7 +122,6 @@ def encode_header(header): if not header: return header - global hqre # return plain header if it is not contains non-ascii characters if hqre.match(header): return header diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py index b75b611..ca310e2 100644 --- a/roundup/roundupdb.py +++ b/roundup/roundupdb.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundupdb.py,v 1.80 2003-01-27 17:02:46 kedder Exp $ +# $Id: roundupdb.py,v 1.81 2003-02-17 06:45:38 richard Exp $ __doc__ = """ Extending hyperdb with types specific to issue-tracking. @@ -260,12 +260,13 @@ class IssueClass: # create the message message = cStringIO.StringIO() writer = MimeWriter.MimeWriter(message) - writer.addheader('Subject', '[%s%s] %s'%(cn, nodeid, encode_header(title))) + writer.addheader('Subject', '[%s%s] %s'%(cn, nodeid, + encode_header(title))) writer.addheader('To', ', '.join(sendto)) writer.addheader('From', straddr((encode_header(authname) + from_tag, from_address))) - writer.addheader('Reply-To', straddr((self.db.config.TRACKER_NAME, - from_address))) + tracker_name = encode_header(self.db.config.TRACKER_NAME) + writer.addheader('Reply-To', straddr((tracker_name, from_address))) writer.addheader('Date', time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime())) writer.addheader('MIME-Version', '1.0') @@ -275,7 +276,7 @@ class IssueClass: writer.addheader('In-Reply-To', inreplyto) # add a uniquely Roundup header to help filtering - writer.addheader('X-Roundup-Name', self.db.config.TRACKER_NAME) + writer.addheader('X-Roundup-Name', tracker_name) # avoid email loops writer.addheader('X-Roundup-Loop', 'hello') -- 2.30.2