From cebb04b4f23f9915e750d16a71b7fc2d24672173 Mon Sep 17 00:00:00 2001 From: cotton Date: Mon, 23 Nov 1998 10:07:19 +0000 Subject: This is a simple change that limits the extremely expensive calculation of html user lists to the roster cgi program. HTMLFormatter: added a .GetAllReplacements() method that does the same thing as GetStandardRepplacements() but also calculates all the html for users lists. Removed the calculation of all the html for the user lists from GetStandardReplacements(). Cgi/roster.py replaced call of GetStandardReplacements() with GetAllReplacements(). scott --- Mailman/HTMLFormatter.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'Mailman/HTMLFormatter.py') diff --git a/Mailman/HTMLFormatter.py b/Mailman/HTMLFormatter.py index 69e1d610c..3635aed7c 100644 --- a/Mailman/HTMLFormatter.py +++ b/Mailman/HTMLFormatter.py @@ -353,12 +353,10 @@ class HTMLFormatter: '' : self.FormatFormEnd(), '' : self.FormatArchiveAnchor(), '' : '', - '' : self.FormatUsers(0), '' : self.FormatSubscriptionMsg(), '' : \ self.RestrictedListMessage('current archive', self.archive_private), - '' : self.FormatUsers(1), '' : `member_len`, '' : `dmember_len`, '' : (`member_len + dmember_len`), @@ -367,7 +365,17 @@ class HTMLFormatter: '' : self.GetAdminEmail(), '' : self.FormatReminder(), } - + + def GetAllReplacements(self): + """ + returns standard replaces plus formatted user lists in + a dict just like GetStandardReplacements. + """ + d = self.GetStandardReplacements() + d.update({"": self.FormatUsers(0), + "": self.FormatUsers(1)}) + return d + def InitTemplates(self): def ExtensionFilter(item): return item[-5:] == '.html' -- cgit v1.2.3-70-g09d2