From 3f38f552972b4f767dc0d29408ad5e5076f4918a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 6 Oct 2020 18:27:54 +0100 Subject: [PATCH] Less verbose --- webinterface.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/webinterface.py b/webinterface.py index 9baaf060..0cc17ee8 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1301,7 +1301,8 @@ def htmlNewswireModeration(baseDir: str, path: str, translate: {}) -> str: url = item[1] nick = item[2] status = item[3] - postFilename = item[4].replace('/', '#') + postFilename = item[4] + postLink = postFilename.replace(baseDir + '/accounts', '') # create the html for this post resultStr += '
' @@ -1320,7 +1321,7 @@ def htmlNewswireModeration(baseDir: str, path: str, translate: {}) -> str: resultStr += \ '' + '/newswireapprove=' + postLink + '">' if '[vote:' + nickname + ':approve]' in status: resultStr += \ '' + '/newswirediscuss=' + postLink + '">' + if os.path.isfile(postFilename + '.discuss'): + resultStr += \ + '' + else: + resultStr += \ + '' resultStr += '
' return resultStr