mirror of https://gitlab.com/bashrc2/epicyon
Set search banner filename
parent
225280fc04
commit
a0cad72aad
10
daemon.py
10
daemon.py
|
@ -17163,6 +17163,16 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if self.server.key_shortcuts.get(nickname):
|
if self.server.key_shortcuts.get(nickname):
|
||||||
access_keys = self.server.key_shortcuts[nickname]
|
access_keys = self.server.key_shortcuts[nickname]
|
||||||
|
|
||||||
|
banner_filename = \
|
||||||
|
acct_dir(base_dir, nickname, self.server.domain) + \
|
||||||
|
'/search_banner.png'
|
||||||
|
if not os.path.isfile(banner_filename):
|
||||||
|
if os.path.isfile(base_dir +
|
||||||
|
'/theme/default/search_banner.png'):
|
||||||
|
copyfile(base_dir +
|
||||||
|
'/theme/default/search_banner.png',
|
||||||
|
banner_filename)
|
||||||
|
|
||||||
# show the search screen
|
# show the search screen
|
||||||
msg = html_search(self.server.translate,
|
msg = html_search(self.server.translate,
|
||||||
self.server.base_dir, self.path,
|
self.server.base_dir, self.path,
|
||||||
|
|
|
@ -404,6 +404,20 @@ def html_search(translate: {}, base_dir: str, path: str, domain: str,
|
||||||
search_banner_file, search_banner_filename = \
|
search_banner_file, search_banner_filename = \
|
||||||
get_search_banner_file(base_dir, search_nickname, domain, theme)
|
get_search_banner_file(base_dir, search_nickname, domain, theme)
|
||||||
|
|
||||||
|
# if there is no search banner then use the default
|
||||||
|
if not search_banner_filename:
|
||||||
|
if os.path.isfile(base_dir +
|
||||||
|
'/theme/default/search_banner.png'):
|
||||||
|
banner_filename = \
|
||||||
|
acct_dir(base_dir, search_nickname, domain) + \
|
||||||
|
'/search_banner.png'
|
||||||
|
copyfile(base_dir +
|
||||||
|
'/theme/default/search_banner.png',
|
||||||
|
banner_filename)
|
||||||
|
search_banner_file, search_banner_filename = \
|
||||||
|
get_search_banner_file(base_dir,
|
||||||
|
search_nickname, domain, theme)
|
||||||
|
|
||||||
text_mode_banner_str = html_keyboard_navigation(text_mode_banner, {}, {})
|
text_mode_banner_str = html_keyboard_navigation(text_mode_banner, {}, {})
|
||||||
if text_mode_banner_str is None:
|
if text_mode_banner_str is None:
|
||||||
text_mode_banner_str = ''
|
text_mode_banner_str = ''
|
||||||
|
|
Loading…
Reference in New Issue