From: richard Date: Thu, 10 Oct 2002 03:48:16 +0000 (+0000) Subject: fixed history to display username instead of userid X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9f96bccb32cae3de034a552084ddad6c9f94b29a;p=roundup.git 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 --- 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:
', _('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