From 81a49a63ce44cdefdc758239bdbdc08479eac3c9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 20 Dec 2020 17:54:55 +0000 Subject: [PATCH] Test without fallbacks --- webapp_column_left.py | 18 ------------------ webapp_column_right.py | 16 ---------------- webapp_hashtagswarm.py | 17 ----------------- webapp_search.py | 17 ----------------- 4 files changed, 68 deletions(-) diff --git a/webapp_column_left.py b/webapp_column_left.py index ada619ed..f8d0d826 100644 --- a/webapp_column_left.py +++ b/webapp_column_left.py @@ -7,14 +7,12 @@ __email__ = "bob@freedombone.net" __status__ = "Production" import os -from shutil import copyfile from utils import getConfigParam from utils import getNicknameFromActor from utils import isEditor from webapp_utils import sharesTimelineJson from webapp_utils import htmlPostSeparator from webapp_utils import getLeftImageFile -from webapp_utils import getImageFile from webapp_utils import headerButtonsFrontScreen from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlFooter @@ -84,22 +82,6 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str, if showHeaderImage: leftImageFile, leftColumnImageFilename = \ getLeftImageFile(baseDir, nickname, domain, theme) - if not os.path.isfile(leftColumnImageFilename): - theme = getConfigParam(baseDir, 'theme').lower() - if theme == 'default': - theme = '' - else: - theme = '_' + theme - themeLeftImageFile, themeLeftColumnImageFilename = \ - getImageFile(baseDir, 'left_col_image', baseDir + '/img', - nickname, domain, theme) - if os.path.isfile(themeLeftColumnImageFilename): - leftColumnImageFilename = \ - baseDir + '/accounts/' + \ - nickname + '@' + domain + '/' + themeLeftImageFile - copyfile(themeLeftColumnImageFilename, - leftColumnImageFilename) - leftImageFile = themeLeftImageFile # show the image at the top of the column editImageClass = 'leftColEdit' diff --git a/webapp_column_right.py b/webapp_column_right.py index 7390bb5f..ed50ff6c 100644 --- a/webapp_column_right.py +++ b/webapp_column_right.py @@ -86,22 +86,6 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, if showHeaderImage: rightImageFile, rightColumnImageFilename = \ getRightImageFile(baseDir, nickname, domain, theme) - if not os.path.isfile(rightColumnImageFilename): - theme = getConfigParam(baseDir, 'theme').lower() - if theme == 'default': - theme = '' - else: - theme = '_' + theme - themeRightImageFile, themeRightColumnImageFilename = \ - getImageFile(baseDir, 'right_col_image', baseDir + '/img', - nickname, domain, theme) - if os.path.isfile(themeRightColumnImageFilename): - rightColumnImageFilename = \ - baseDir + '/accounts/' + \ - nickname + '@' + domain + '/' + themeRightImageFile - copyfile(themeRightColumnImageFilename, - rightColumnImageFilename) - rightImageFile = themeRightImageFile # show the image at the top of the column editImageClass = 'rightColEdit' diff --git a/webapp_hashtagswarm.py b/webapp_hashtagswarm.py index 41d6d324..2cbc7bd8 100644 --- a/webapp_hashtagswarm.py +++ b/webapp_hashtagswarm.py @@ -253,23 +253,6 @@ def htmlSearchHashtagCategory(cssCache: {}, translate: {}, # show a banner above the search box searchBannerFile, searchBannerFilename = \ getSearchBannerFile(baseDir, searchNickname, domain, theme) - if not os.path.isfile(searchBannerFilename): - # get the default search banner for the theme - theme = getConfigParam(baseDir, 'theme').lower() - if theme == 'default': - theme = '' - else: - theme = '_' + theme - themeSearchImageFile, themeSearchBannerFilename = \ - getImageFile(baseDir, 'search_banner', baseDir + '/img', - searchNickname, domain, theme) - if os.path.isfile(themeSearchBannerFilename): - searchBannerFilename = \ - baseDir + '/accounts/' + \ - searchNickname + '@' + domain + '/' + themeSearchImageFile - copyfile(themeSearchBannerFilename, - searchBannerFilename) - searchBannerFile = themeSearchImageFile if os.path.isfile(searchBannerFilename): htmlStr += '\n' diff --git a/webapp_search.py b/webapp_search.py index 6241171e..caffa2ae 100644 --- a/webapp_search.py +++ b/webapp_search.py @@ -332,23 +332,6 @@ def htmlSearch(cssCache: {}, translate: {}, # show a banner above the search box searchBannerFile, searchBannerFilename = \ getSearchBannerFile(baseDir, searchNickname, domain, theme) - if not os.path.isfile(searchBannerFilename): - # get the default search banner for the theme - theme = getConfigParam(baseDir, 'theme').lower() - if theme == 'default': - theme = '' - else: - theme = '_' + theme - themeSearchImageFile, themeSearchBannerFilename = \ - getImageFile(baseDir, 'search_banner', baseDir + '/img', - searchNickname, domain, theme) - if os.path.isfile(themeSearchBannerFilename): - searchBannerFilename = \ - baseDir + '/accounts/' + \ - searchNickname + '@' + domain + '/' + themeSearchImageFile - copyfile(themeSearchBannerFilename, - searchBannerFilename) - searchBannerFile = themeSearchImageFile if os.path.isfile(searchBannerFilename): usersPath = '/users/' + searchNickname