From 2d920637ac90aad15317607d7d4dd96c41a61c15 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sun, 10 Aug 2008 01:52:13 -0300 Subject: [PATCH] Make the comment author a link only if the comment has a link attribute --- blitiri.cgi | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/blitiri.cgi b/blitiri.cgi index 79e4171..d48b8eb 100755 --- a/blitiri.cgi +++ b/blitiri.cgi @@ -140,7 +140,7 @@ default_comment_header = """

Comment #%(number)d

-by %(author)s +by %(linked_author)s on %(year)04d-%(month)02d-%(day)02d %(hour)02d:%(minute)02d

@@ -444,8 +444,14 @@ class Templates (object): 'art_footer', default_article_footer, article.to_vars()) def get_comment_header(self, comment): + vars = comment.to_vars() + if comment.link: + vars['linked_author'] = '%s' \ + % (comment.link, comment.author) + else: + vars['linked_author'] = comment.author return self.get_template( - 'com_header', default_comment_header, comment.to_vars()) + 'com_header', default_comment_header, vars) def get_comment_footer(self, comment): return self.get_template( -- 2.43.0