Update of /cvsroot/mailman/mailman/Mailman/Handlers
In directory sc8-pr-cvs1:/tmp/cvs-serv3563

Modified Files:
      Tag: Release_2_1-maint
        Hold.py 
Log Message:
hold_for_approval(): Another part of TK's patch # 865661.  Encode the
subject header in the list's preferred character set and make sure it
is all on one line, when sent back to the original author.


Index: Hold.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/Hold.py,v
retrieving revision 2.33.2.1
retrieving revision 2.33.2.2
diff -u -d -r2.33.2.1 -r2.33.2.2
--- Hold.py     31 Mar 2003 21:49:42 -0000      2.33.2.1
+++ Hold.py     26 Dec 2003 22:55:45 -0000      2.33.2.2
@@ -197,6 +197,12 @@
         exc = exc()
     listname = mlist.real_name
     sender = msgdata.get('sender', msg.get_sender())
+    usersubject = msg.get('subject')
+    charset = Utils.GetCharSet(mlist.preferred_language)
+    if usersubject:
+        usersubject = Utils.oneline(usersubject, charset)
+    else:
+        usersubject = _('(no subject)')
     message_id = msg.get('message-id', 'n/a')
     owneraddr = mlist.GetOwnerEmail()
     adminaddr = mlist.GetBouncesEmail()
@@ -212,7 +218,7 @@
          'hostname'   : mlist.host_name,
          'reason'     : _(reason),
          'sender'     : sender,
-         'subject'    : msg.get('subject', _('(no subject)')),
+         'subject'    : usersubject,
          'admindb_url': mlist.GetScriptURL('admindb', absolute=1),
          }
     # We may want to send a notification to the original sender too
@@ -247,7 +253,6 @@
             lang = mlist.preferred_language
             charset = Utils.GetCharSet(lang)
             # We need to regenerate or re-translate a few values in d
-            usersubject = msg.get('subject', _('(no subject)'))
             d['reason'] = _(reason)
             d['subject'] = usersubject
             # craft the admin notification message and deliver it



_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to