main
Bob Mottram 2020-03-01 12:51:11 +00:00
parent 3e477ccf9f
commit d5a43f6844
1 changed files with 18 additions and 11 deletions

View File

@ -2382,20 +2382,27 @@ class PubServer(BaseHTTPRequestHandler):
if '?' in actor: if '?' in actor:
actor=actor.split('?')[0] actor=actor.split('?')[0]
actor=self.server.domainFull+'/users/'+actor actor=self.server.domainFull+'/users/'+actor
print('Edit blog actor: '+actor)
pathWithoutOptions=self.path.split('?')[0] pathWithoutOptions=self.path.split('?')[0]
if actor in pathWithoutOptions: print('Edit blog path: '+pathWithoutOptions)
if actor+'/' in pathWithoutOptions:
msg=None
nickname=getNicknameFromActor(self.path) nickname=getNicknameFromActor(self.path)
postUrl=pathWithoutOptions+'/statuses/'+messageId if nickname:
msg=htmlEditBlog(self.server.mediaInstance, \ postUrl=pathWithoutOptions+'/statuses/'+messageId
self.server.translate, \ print('Edit blog nickname: '+nickname)
self.server.baseDir, \ print('Edit blog post: '+postUrl)
self.server.httpPrefix, \ msg=htmlEditBlog(self.server.mediaInstance, \
self.path, \ self.server.translate, \
replyPageNumber, \ self.server.baseDir, \
nickname,self.server.domain, \ self.server.httpPrefix, \
postUrl) self.path, \
replyPageNumber, \
nickname,self.server.domain, \
postUrl)
if msg: if msg:
msg-msg.encode() print('Edit blog write: '+postUrl)
msg=msg.encode()
self._set_headers('text/html',len(msg),cookie) self._set_headers('text/html',len(msg),cookie)
self._write(msg) self._write(msg)
self.server.GETbusy=False self.server.GETbusy=False