From 70b41eb3c70571f0678d6f8f8f8e78682895cdf8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 26 Aug 2019 10:15:48 +0100 Subject: [PATCH] Sequence --- daemon.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/daemon.py b/daemon.py index a85f5b26..65a63673 100644 --- a/daemon.py +++ b/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]