From 8f872c6fac7c58dc191db0df97881e42a6fd3312 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 2 Nov 2020 10:17:50 +0000 Subject: [PATCH] Search banner --- webinterface.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/webinterface.py b/webinterface.py index f4d328fb..b69c4552 100644 --- a/webinterface.py +++ b/webinterface.py @@ -8620,7 +8620,6 @@ def htmlSearch(cssCache: {}, translate: {}, followStr = htmlHeader(cssFilename, profileStyle) # show a banner above the search box - usersPath = baseDir + '/accounts/' + searchNickname + '@' + domain searchBannerFile, searchBannerFilename = \ getSearchBannerFile(baseDir, searchNickname, domain) if not os.path.isfile(searchBannerFilename): @@ -8633,17 +8632,20 @@ def htmlSearch(cssCache: {}, translate: {}, bannerExtensions = ('png', 'jpg', 'jpeg', 'gif', 'avif', 'webp') for ext in bannerExtensions: searchBannerFile = 'search_banner.' + ext - searchBannerFilename = usersPath + '/' + searchBannerFile + searchBannerFilename = \ + baseDir + '/accounts/' + \ + searchNickname + '@' + domain + '/' + searchBannerFile themeSearchBannerFilename = \ baseDir + '/img/search_banner' + theme + '.' + ext if os.path.isfile(themeSearchBannerFilename): copyfile(themeSearchBannerFilename, searchBannerFilename) break if os.path.isfile(searchBannerFilename): + usersPath = '/users/' + searchNickname followStr += \ - '\n' + '\n' followStr += '\n'