Remove debug

merge-requests/20/merge
Bob Mottram 2021-07-28 16:15:23 +01:00
parent 4b9c826a35
commit cdb629fd9d
2 changed files with 0 additions and 8 deletions

View File

@ -11257,9 +11257,7 @@ class PubServer(BaseHTTPRequestHandler):
# remove a shared item
if htmlGET and '?rmshare=' in self.path:
itemID = self.path.split('?rmshare=')[1]
print('Shared item ID 0: ' + itemID)
itemID = urllib.parse.unquote_plus(itemID.strip())
print('Shared item ID 1: ' + itemID)
usersPath = self.path.split('?rmshare=')[0]
actor = \
self.server.httpPrefix + '://' + \
@ -11270,7 +11268,6 @@ class PubServer(BaseHTTPRequestHandler):
actor, itemID,
callingDomain)
if not msg:
print('Shared item ID: no msg')
if callingDomain.endswith('.onion') and \
self.server.onionDomain:
actor = 'http://' + self.server.onionDomain + usersPath

View File

@ -107,7 +107,6 @@ def htmlConfirmRemoveSharedItem(cssCache: {}, translate: {}, baseDir: str,
callingDomain: str) -> str:
"""Shows a screen asking to confirm the removal of a shared item
"""
print('Shared item ID 2: ' + itemID)
nickname = getNicknameFromActor(actor)
domain, port = getDomainFromActor(actor)
domainFull = getFullDomain(domain, port)
@ -115,16 +114,13 @@ def htmlConfirmRemoveSharedItem(cssCache: {}, translate: {}, baseDir: str,
if not os.path.isfile(sharesFile):
print('ERROR: no shares file ' + sharesFile)
return None
print('Shared item ID 3: ' + itemID)
sharesJson = loadJson(sharesFile)
if not sharesJson:
print('ERROR: unable to load shares.json')
return None
print('Shared item ID 4: ' + itemID)
if not sharesJson.get(itemID):
print('ERROR: share named "' + itemID + '" is not in ' + sharesFile)
return None
print('Shared item ID 5: ' + itemID)
sharedItemDisplayName = sharesJson[itemID]['displayName']
sharedItemImageUrl = None
if sharesJson[itemID].get('imageUrl'):
@ -167,7 +163,6 @@ def htmlConfirmRemoveSharedItem(cssCache: {}, translate: {}, baseDir: str,
sharesStr += ' </div>\n'
sharesStr += '</div>\n'
sharesStr += htmlFooter()
print('Shared item ID 6: ' + sharesStr)
return sharesStr