From c41aacba6f94196018b8282054e79c379bfb9c6c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 28 Jul 2021 15:22:06 +0100 Subject: [PATCH] Removing share via its itemID --- daemon.py | 4 ---- webapp_confirm.py | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/daemon.py b/daemon.py index 45a27dfee..12337a5a9 100644 --- a/daemon.py +++ b/daemon.py @@ -11256,22 +11256,18 @@ class PubServer(BaseHTTPRequestHandler): # remove a shared item if htmlGET and '?rmshare=' in self.path: - print('Debug rmshare: 1: ' + self.path) shareName = self.path.split('?rmshare=')[1] shareName = urllib.parse.unquote_plus(shareName.strip()) - print('Debug rmshare: 2: ' + shareName) usersPath = self.path.split('?rmshare=')[0] actor = \ self.server.httpPrefix + '://' + \ self.server.domainFull + usersPath - print('Debug rmshare: 3: ' + actor) msg = htmlConfirmRemoveSharedItem(self.server.cssCache, self.server.translate, self.server.baseDir, actor, shareName, callingDomain) if not msg: - print('Debug rmshare: no msg ' + actor) if callingDomain.endswith('.onion') and \ self.server.onionDomain: actor = 'http://' + self.server.onionDomain + usersPath diff --git a/webapp_confirm.py b/webapp_confirm.py index c7f34bbe6..cdd51b1e1 100644 --- a/webapp_confirm.py +++ b/webapp_confirm.py @@ -104,11 +104,10 @@ def htmlConfirmDelete(cssCache: {}, def htmlConfirmRemoveSharedItem(cssCache: {}, translate: {}, baseDir: str, - actor: str, shareName: str, + actor: str, itemID: str, callingDomain: str) -> str: """Shows a screen asking to confirm the removal of a shared item """ - itemID = getValidSharedItemID(actor, shareName) nickname = getNicknameFromActor(actor) domain, port = getDomainFromActor(actor) domainFull = getFullDomain(domain, port) @@ -153,7 +152,7 @@ def htmlConfirmRemoveSharedItem(cssCache: {}, translate: {}, baseDir: str, sharesStr += \ ' \n' sharesStr += ' \n' + itemID + '">\n' sharesStr += \ ' \n'