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,10 +2382,16 @@ 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)
if nickname:
postUrl=pathWithoutOptions+'/statuses/'+messageId postUrl=pathWithoutOptions+'/statuses/'+messageId
print('Edit blog nickname: '+nickname)
print('Edit blog post: '+postUrl)
msg=htmlEditBlog(self.server.mediaInstance, \ msg=htmlEditBlog(self.server.mediaInstance, \
self.server.translate, \ self.server.translate, \
self.server.baseDir, \ self.server.baseDir, \
@ -2395,7 +2401,8 @@ class PubServer(BaseHTTPRequestHandler):
nickname,self.server.domain, \ nickname,self.server.domain, \
postUrl) 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