Pass domain as argument

main
Bob Mottram 2020-06-10 13:53:16 +01:00
parent df73c4f04e
commit 691253d1c8
2 changed files with 3 additions and 3 deletions

View File

@ -2141,7 +2141,8 @@ class PubServer(BaseHTTPRequestHandler):
self.path = self.path.split('?')[0]
# show the search screen
msg = htmlSearch(self.server.translate,
self.server.baseDir, self.path).encode()
self.server.baseDir, self.path,
self.server.domain).encode()
self._set_headers('text/html', len(msg), cookie, callingDomain)
self._write(msg)
self.server.GETbusy = False

View File

@ -5848,12 +5848,11 @@ def htmlHashTagSwarm(baseDir: str, actor: str) -> str:
def htmlSearch(translate: {},
baseDir: str, path: str) -> str:
baseDir: str, path: str, domain: str) -> str:
"""Search called from the timeline icon
"""
actor = path.replace('/search', '')
searchNickname = getNicknameFromActor(actor)
domain, port = getDomainFromActor(actor)
if os.path.isfile(baseDir + '/img/search-background.png'):
if not os.path.isfile(baseDir + '/accounts/search-background.png'):