diff options
author | bwarsaw <> | 2003-12-26 22:51:10 +0000 |
---|---|---|
committer | bwarsaw <> | 2003-12-26 22:51:10 +0000 |
commit | 05633b8758c2f48b0f3c9a558c956b458b19af18 (patch) | |
tree | 30f2843e0a61722034fbe295512075f79f30655b /cron/checkdbs | |
parent | 95e3d60bf33db57cd326a665baa9d7db3b3021b8 (diff) | |
download | mailman2-05633b8758c2f48b0f3c9a558c956b458b19af18.tar.gz mailman2-05633b8758c2f48b0f3c9a558c956b458b19af18.tar.xz mailman2-05633b8758c2f48b0f3c9a558c956b458b19af18.zip |
pending_requests(): Another part of TK's patch # 865661. Makes sure
the user's full name is encoded in the list's charset properly. It
also makes sure that the Subject description spans exactly one line.
Diffstat (limited to 'cron/checkdbs')
-rwxr-xr-x | cron/checkdbs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cron/checkdbs b/cron/checkdbs index 39b12095..1c867c53 100755 --- a/cron/checkdbs +++ b/cron/checkdbs @@ -122,6 +122,7 @@ def main(): def pending_requests(mlist): # Must return a byte string + lcset = Utils.GetCharSet(mlist.preferred_language) pending = [] first = 1 for id in mlist.GetSubscriptionIds(): @@ -130,6 +131,8 @@ def pending_requests(mlist): first = 0 when, addr, fullname, passwd, digest, lang = mlist.GetRecord(id) if fullname: + if isinstance(fullname, UnicodeType): + fullname = fullname.encode(lcset, 'replace') fullname = ' (%s)' % fullname pending.append(' %s%s %s' % (addr, fullname, time.ctime(when))) first = 1 @@ -139,6 +142,7 @@ def pending_requests(mlist): first = 0 info = mlist.GetRecord(id) when, sender, subject, reason, text, msgdata = mlist.GetRecord(id) + subject = Utils.oneline(subject, lcset) date = time.ctime(when) reason = _(reason) pending.append(_("""\ |