mirror of https://gitlab.com/bashrc2/epicyon
Remove debug
parent
4b9c826a35
commit
cdb629fd9d
|
@ -11257,9 +11257,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
# remove a shared item
|
# remove a shared item
|
||||||
if htmlGET and '?rmshare=' in self.path:
|
if htmlGET and '?rmshare=' in self.path:
|
||||||
itemID = self.path.split('?rmshare=')[1]
|
itemID = self.path.split('?rmshare=')[1]
|
||||||
print('Shared item ID 0: ' + itemID)
|
|
||||||
itemID = urllib.parse.unquote_plus(itemID.strip())
|
itemID = urllib.parse.unquote_plus(itemID.strip())
|
||||||
print('Shared item ID 1: ' + itemID)
|
|
||||||
usersPath = self.path.split('?rmshare=')[0]
|
usersPath = self.path.split('?rmshare=')[0]
|
||||||
actor = \
|
actor = \
|
||||||
self.server.httpPrefix + '://' + \
|
self.server.httpPrefix + '://' + \
|
||||||
|
@ -11270,7 +11268,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
actor, itemID,
|
actor, itemID,
|
||||||
callingDomain)
|
callingDomain)
|
||||||
if not msg:
|
if not msg:
|
||||||
print('Shared item ID: no msg')
|
|
||||||
if callingDomain.endswith('.onion') and \
|
if callingDomain.endswith('.onion') and \
|
||||||
self.server.onionDomain:
|
self.server.onionDomain:
|
||||||
actor = 'http://' + self.server.onionDomain + usersPath
|
actor = 'http://' + self.server.onionDomain + usersPath
|
||||||
|
|
|
@ -107,7 +107,6 @@ def htmlConfirmRemoveSharedItem(cssCache: {}, translate: {}, baseDir: str,
|
||||||
callingDomain: str) -> str:
|
callingDomain: str) -> str:
|
||||||
"""Shows a screen asking to confirm the removal of a shared item
|
"""Shows a screen asking to confirm the removal of a shared item
|
||||||
"""
|
"""
|
||||||
print('Shared item ID 2: ' + itemID)
|
|
||||||
nickname = getNicknameFromActor(actor)
|
nickname = getNicknameFromActor(actor)
|
||||||
domain, port = getDomainFromActor(actor)
|
domain, port = getDomainFromActor(actor)
|
||||||
domainFull = getFullDomain(domain, port)
|
domainFull = getFullDomain(domain, port)
|
||||||
|
@ -115,16 +114,13 @@ def htmlConfirmRemoveSharedItem(cssCache: {}, translate: {}, baseDir: str,
|
||||||
if not os.path.isfile(sharesFile):
|
if not os.path.isfile(sharesFile):
|
||||||
print('ERROR: no shares file ' + sharesFile)
|
print('ERROR: no shares file ' + sharesFile)
|
||||||
return None
|
return None
|
||||||
print('Shared item ID 3: ' + itemID)
|
|
||||||
sharesJson = loadJson(sharesFile)
|
sharesJson = loadJson(sharesFile)
|
||||||
if not sharesJson:
|
if not sharesJson:
|
||||||
print('ERROR: unable to load shares.json')
|
print('ERROR: unable to load shares.json')
|
||||||
return None
|
return None
|
||||||
print('Shared item ID 4: ' + itemID)
|
|
||||||
if not sharesJson.get(itemID):
|
if not sharesJson.get(itemID):
|
||||||
print('ERROR: share named "' + itemID + '" is not in ' + sharesFile)
|
print('ERROR: share named "' + itemID + '" is not in ' + sharesFile)
|
||||||
return None
|
return None
|
||||||
print('Shared item ID 5: ' + itemID)
|
|
||||||
sharedItemDisplayName = sharesJson[itemID]['displayName']
|
sharedItemDisplayName = sharesJson[itemID]['displayName']
|
||||||
sharedItemImageUrl = None
|
sharedItemImageUrl = None
|
||||||
if sharesJson[itemID].get('imageUrl'):
|
if sharesJson[itemID].get('imageUrl'):
|
||||||
|
@ -167,7 +163,6 @@ def htmlConfirmRemoveSharedItem(cssCache: {}, translate: {}, baseDir: str,
|
||||||
sharesStr += ' </div>\n'
|
sharesStr += ' </div>\n'
|
||||||
sharesStr += '</div>\n'
|
sharesStr += '</div>\n'
|
||||||
sharesStr += htmlFooter()
|
sharesStr += htmlFooter()
|
||||||
print('Shared item ID 6: ' + sharesStr)
|
|
||||||
return sharesStr
|
return sharesStr
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue