From 1e52123c0db8e19e2c254bfe87a7851b0e2d5966 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 9 Dec 2020 19:17:42 +0000 Subject: [PATCH] Link back to moderator screen --- daemon.py | 4 +++- webapp_moderation.py | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/daemon.py b/daemon.py index cf2a87348..3e6aac753 100644 --- a/daemon.py +++ b/daemon.py @@ -1403,6 +1403,7 @@ class PubServer(BaseHTTPRequestHandler): """Actions on the moderator screeen """ usersPath = path.replace('/moderationaction', '') + nickname = usersPath.replace('/users/', '') actorStr = httpPrefix + '://' + domainFull + usersPath length = int(self.headers['Content-length']) @@ -1441,7 +1442,8 @@ class PubServer(BaseHTTPRequestHandler): elif moderationStr.startswith('submitInfo'): msg = htmlModerationInfo(self.server.cssCache, self.server.translate, - baseDir, httpPrefix) + baseDir, httpPrefix, + nickname) msg = msg.encode('utf-8') self._login_headers('text/html', len(msg), callingDomain) diff --git a/webapp_moderation.py b/webapp_moderation.py index 6c23ef401..78a36881a 100644 --- a/webapp_moderation.py +++ b/webapp_moderation.py @@ -45,7 +45,8 @@ def htmlModeration(cssCache: {}, defaultTimeline: str, def htmlModerationInfo(cssCache: {}, translate: {}, - baseDir: str, httpPrefix: str) -> str: + baseDir: str, httpPrefix: str, + nickname: str) -> str: msgStr1 = \ 'These are globally blocked for all accounts on this instance' msgStr2 = \ @@ -58,9 +59,9 @@ def htmlModerationInfo(cssCache: {}, translate: {}, infoForm = htmlHeaderWithExternalStyle(cssFilename) infoForm += \ - '

' + \ + '

' + \ translate['Moderation Information'] + \ - '

' + '

' infoShown = False suspendedFilename = baseDir + '/accounts/suspended.txt'