mirror of https://gitlab.com/bashrc2/epicyon
Link back to moderator screen
parent
c3a4d8d05c
commit
1e52123c0d
|
@ -1403,6 +1403,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
"""Actions on the moderator screeen
|
"""Actions on the moderator screeen
|
||||||
"""
|
"""
|
||||||
usersPath = path.replace('/moderationaction', '')
|
usersPath = path.replace('/moderationaction', '')
|
||||||
|
nickname = usersPath.replace('/users/', '')
|
||||||
actorStr = httpPrefix + '://' + domainFull + usersPath
|
actorStr = httpPrefix + '://' + domainFull + usersPath
|
||||||
|
|
||||||
length = int(self.headers['Content-length'])
|
length = int(self.headers['Content-length'])
|
||||||
|
@ -1441,7 +1442,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
elif moderationStr.startswith('submitInfo'):
|
elif moderationStr.startswith('submitInfo'):
|
||||||
msg = htmlModerationInfo(self.server.cssCache,
|
msg = htmlModerationInfo(self.server.cssCache,
|
||||||
self.server.translate,
|
self.server.translate,
|
||||||
baseDir, httpPrefix)
|
baseDir, httpPrefix,
|
||||||
|
nickname)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
self._login_headers('text/html',
|
self._login_headers('text/html',
|
||||||
len(msg), callingDomain)
|
len(msg), callingDomain)
|
||||||
|
|
|
@ -45,7 +45,8 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
||||||
|
|
||||||
|
|
||||||
def htmlModerationInfo(cssCache: {}, translate: {},
|
def htmlModerationInfo(cssCache: {}, translate: {},
|
||||||
baseDir: str, httpPrefix: str) -> str:
|
baseDir: str, httpPrefix: str,
|
||||||
|
nickname: str) -> str:
|
||||||
msgStr1 = \
|
msgStr1 = \
|
||||||
'These are globally blocked for all accounts on this instance'
|
'These are globally blocked for all accounts on this instance'
|
||||||
msgStr2 = \
|
msgStr2 = \
|
||||||
|
@ -58,9 +59,9 @@ def htmlModerationInfo(cssCache: {}, translate: {},
|
||||||
infoForm = htmlHeaderWithExternalStyle(cssFilename)
|
infoForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||||
|
|
||||||
infoForm += \
|
infoForm += \
|
||||||
'<center><h1>' + \
|
'<center><h1><a href="/users/' + nickname + '/moderation">' + \
|
||||||
translate['Moderation Information'] + \
|
translate['Moderation Information'] + \
|
||||||
'</h1></center>'
|
'</a></h1></center>'
|
||||||
|
|
||||||
infoShown = False
|
infoShown = False
|
||||||
suspendedFilename = baseDir + '/accounts/suspended.txt'
|
suspendedFilename = baseDir + '/accounts/suspended.txt'
|
||||||
|
|
Loading…
Reference in New Issue