From 9f96bccb32cae3de034a552084ddad6c9f94b29a Mon Sep 17 00:00:00 2001 From: richard Date: Thu, 10 Oct 2002 03:48:16 +0000 Subject: [PATCH] fixed history to display username instead of userid git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1331 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/cgi/templating.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index 4c4a13b..cfe998e 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -490,7 +490,7 @@ class HTMLItem(HTMLPermissions): # XXX do this return [] - def history(self, direction='descending'): + def history(self, direction='descending', dre=re.compile('\d+')): l = ['' ''%( date_s, user, action, arg_s)) if comments: -- 2.30.2
', _('History'), @@ -629,6 +629,10 @@ class HTMLItem(HTMLPermissions): handled by the history display!''') arg_s = '' + str(args) + '' date_s = date_s.replace(' ', ' ') + # if the user's an itemid, figure the username (older journals + # have the username) + if dre.match(user): + user = self._db.user.get(user, 'username') l.append('
%s%s%s%s