Indentation

main
Bob Mottram 2020-02-25 09:34:45 +00:00
parent e36b6a8646
commit 372d9c3328
1 changed files with 43 additions and 43 deletions

View File

@ -995,50 +995,50 @@ class PubServer(BaseHTTPRequestHandler):
self._benchmarkGETtimings(GETstartTime,GETtimings,8) self._benchmarkGETtimings(GETstartTime,GETtimings,8)
# show the person options screen with view/follow/block/report
if htmlGET and '/users/' in self.path: if htmlGET and '/users/' in self.path:
if '?options=' in self.path: # show the person options screen with view/follow/block/report
optionsStr=self.path.split('?options=')[1] if '?options=' in self.path:
originPathStr=self.path.split('?options=')[0] optionsStr=self.path.split('?options=')[1]
if ';' in optionsStr: originPathStr=self.path.split('?options=')[0]
pageNumber=1 if ';' in optionsStr:
optionsList=optionsStr.split(';') pageNumber=1
optionsActor=optionsList[0] optionsList=optionsStr.split(';')
optionsPageNumber=optionsList[1] optionsActor=optionsList[0]
optionsProfileUrl=optionsList[2] optionsPageNumber=optionsList[1]
if optionsPageNumber.isdigit(): optionsProfileUrl=optionsList[2]
pageNumber=int(optionsPageNumber) if optionsPageNumber.isdigit():
optionsLink=None pageNumber=int(optionsPageNumber)
if len(optionsList)>3: optionsLink=None
optionsLink=optionsList[3] if len(optionsList)>3:
donateUrl=None optionsLink=optionsList[3]
PGPpubKey=None donateUrl=None
xmppAddress=None PGPpubKey=None
matrixAddress=None xmppAddress=None
emailAddress=None matrixAddress=None
actorJson=getPersonFromCache(self.server.baseDir,optionsActor,self.server.personCache) emailAddress=None
if actorJson: actorJson=getPersonFromCache(self.server.baseDir,optionsActor,self.server.personCache)
donateUrl=getDonationUrl(actorJson) if actorJson:
xmppAddress=getXmppAddress(actorJson) donateUrl=getDonationUrl(actorJson)
matrixAddress=getMatrixAddress(actorJson) xmppAddress=getXmppAddress(actorJson)
emailAddress=getEmailAddress(actorJson) matrixAddress=getMatrixAddress(actorJson)
PGPpubKey=getPGPpubKey(actorJson) emailAddress=getEmailAddress(actorJson)
msg=htmlPersonOptions(self.server.translate, \ PGPpubKey=getPGPpubKey(actorJson)
self.server.baseDir, \ msg=htmlPersonOptions(self.server.translate, \
self.server.domain, \ self.server.baseDir, \
originPathStr, \ self.server.domain, \
optionsActor, \ originPathStr, \
optionsProfileUrl, \ optionsActor, \
optionsLink, \ optionsProfileUrl, \
pageNumber,donateUrl, \ optionsLink, \
xmppAddress,matrixAddress, \ pageNumber,donateUrl, \
PGPpubKey,emailAddress).encode() xmppAddress,matrixAddress, \
self._set_headers('text/html',len(msg),cookie) PGPpubKey,emailAddress).encode()
self._write(msg) self._set_headers('text/html',len(msg),cookie)
return self._write(msg)
originPathStrAbsolute=self.server.httpPrefix+'://'+self.server.domainFull+originPathStr return
self._redirect_headers(originPathStrAbsolute,cookie) originPathStrAbsolute=self.server.httpPrefix+'://'+self.server.domainFull+originPathStr
return self._redirect_headers(originPathStrAbsolute,cookie)
return
# show blog post # show blog post
blogFilename,nickname= \ blogFilename,nickname= \