master
Bob Mottram 2019-08-26 10:15:48 +01:00
parent 2f336bc33f
commit 70b41eb3c7
1 changed files with 14 additions and 14 deletions

View File

@ -543,6 +543,20 @@ class PubServer(BaseHTTPRequestHandler):
self.server.GETbusy=False
return
# remove a shared item
if htmlGET and '?rmshare=' in self.path:
shareName=self.path.split('?rmshare=')[1]
actor=self.server.httpPrefix+'://'+self.server.domainFull+self.path.split('?rmshare=')[0]
msg=htmlRemoveSharedItem(self.server.baseDir,actor,shareName).encode()
if not msg:
self._redirect_headers(actor+'/inbox',cookie)
self.server.GETbusy=False
return
self._set_headers('text/html',len(msg),cookie)
self.wfile.write(msg)
self.server.GETbusy=False
return
# if not authorized then show the login screen
if htmlGET and self.path!='/login' and self.path!='/' and self.path!='/terms':
if '/media/' not in self.path and \
@ -980,20 +994,6 @@ class PubServer(BaseHTTPRequestHandler):
self._redirect_headers(actor+'/inbox',cookie)
return
# remove a shared item
if htmlGET and '?rmshare=' in self.path:
shareName=self.path.split('?rmshare=')[1]
actor=self.server.httpPrefix+'://'+self.server.domainFull+self.path.split('?rmshare=')[0]
msg=htmlRemoveSharedItem(self.server.baseDir,actor,shareName).encode()
if not msg:
self._redirect_headers(actor+'/inbox',cookie)
self.server.GETbusy=False
return
self._set_headers('text/html',len(msg),cookie)
self.wfile.write(msg)
self.server.GETbusy=False
return
# delete a post from the web interface icon
if htmlGET and '?delete=' in self.path:
deleteUrl=self.path.split('?delete=')[1]