From b0fea9c7f7d97d9dbc2224f10ea9763a4c4f5eb7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 23 Oct 2019 14:19:24 +0100 Subject: [PATCH] Remove full screen image --- daemon.py | 18 ------------------ webinterface.py | 38 -------------------------------------- 2 files changed, 56 deletions(-) diff --git a/daemon.py b/daemon.py index af5ce895..042c9da4 100644 --- a/daemon.py +++ b/daemon.py @@ -81,7 +81,6 @@ from roles import setRole from roles import clearModeratorStatus from skills import outboxSkills from availability import outboxAvailability -from webinterface import htmlFullScreenImage from webinterface import htmlDeletePost from webinterface import htmlAbout from webinterface import htmlRemoveSharedItem @@ -754,7 +753,6 @@ class PubServer(BaseHTTPRequestHandler): '/emoji/' not in self.path and \ '/tags/' not in self.path and \ '/avatars/' not in self.path and \ - '/fullscreen?' not in self.path and \ '/icons/' not in self.path: divertToLoginScreen=True if self.path.startswith('/users/'): @@ -972,22 +970,6 @@ class PubServer(BaseHTTPRequestHandler): self._404() return - # full screen images shown from the media timeline - if htmlGET and authorized and '/fullscreen?' in self.path: - imageFilename=self.path.split('?img=')[1].replace('%20',' ').replace('%40','@').replace('%3A',':').replace('%23','#') - if '?' in imageFilename: - imageFilename=imageFilename.split('?')[0] - imageDescription=None - if '?desc=' in self.path: - imageDescription=self.path.split('?desc=')[1].replace('%20',' ').replace('%40','@').replace('%3A',':').replace('%23','#') - if '?' in imageDescription: - imageDescription=imageDescription.split('?')[0] - msg=htmlFullScreenImage(imageFilename,imageDescription).encode('utf-8') - self._set_headers('text/html',len(msg),cookie) - self._write(msg) - self.server.GETbusy=False - return - # cached avatar images # Note that this comes before the busy flag to avoid conflicts if self.path.startswith('/avatars/'): diff --git a/webinterface.py b/webinterface.py index 6b0d8e83..4b796b5d 100644 --- a/webinterface.py +++ b/webinterface.py @@ -51,44 +51,6 @@ from skills import getSkills from cache import getPersonFromCache from cache import storePersonInCache -def htmlFullScreenImage(imageFilename: str,description: str) -> str: - """On the media timeline show a full screen image when selecting it - """ - htmlStr='\n' - htmlStr+='\n' - htmlStr+='\n' - htmlStr+='\n' - htmlStr+='\n' - htmlStr+='\n' - htmlStr+='\n' - htmlStr+='\n' - htmlStr+='
\n' - htmlStr+='\n' - if description: - htmlStr+='

'+description+'

\n' - htmlStr+='\n' - htmlStr+='\n' - htmlStr+='' - return htmlStr - def updateAvatarImageCache(session,baseDir: str,httpPrefix: str,actor: str,avatarUrl: str,personCache: {},force=False) -> str: """Updates the cached avatar for the given actor """