forked from indymedia/epicyon
Sequence
parent
2f336bc33f
commit
70b41eb3c7
28
daemon.py
28
daemon.py
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue