diff --git a/daemon.py b/daemon.py index d52c6b29..8525442b 100644 --- a/daemon.py +++ b/daemon.py @@ -140,7 +140,6 @@ from webapp_login import htmlGetLoginCredentials from webapp import htmlSuspended from webapp import htmlFollowConfirm from webapp import htmlUnfollowConfirm -from webapp import htmlEditNewsPost from webapp import htmlTermsOfService from webapp import htmlModerationInfo from webapp import htmlHashtagBlocked @@ -154,6 +153,7 @@ from webapp_column_left import htmlEditLinks from webapp_column_right import htmlNewswireMobile from webapp_column_right import htmlEditNewswire from webapp_column_right import htmlCitations +from webapp_column_right import htmlEditNewsPost from webapp_search import htmlSkillsSearch from webapp_search import htmlHistorySearch from webapp_search import htmlHashtagSearch diff --git a/webapp.py b/webapp.py index ee0f0200..b395b0be 100644 --- a/webapp.py +++ b/webapp.py @@ -14,7 +14,6 @@ from utils import getDomainFromActor from utils import locatePost from utils import loadJson from utils import getConfigParam -from posts import isEditor from shares import getValidSharedItemID from webapp_utils import getAltPath from webapp_utils import getIconsDir @@ -115,84 +114,6 @@ def htmlModerationInfo(cssCache: {}, translate: {}, return infoForm -def htmlEditNewsPost(cssCache: {}, translate: {}, baseDir: str, path: str, - domain: str, port: int, - httpPrefix: str, postUrl: str) -> str: - """Edits a news post - """ - if '/users/' not in path: - return '' - pathOriginal = path - - nickname = getNicknameFromActor(path) - if not nickname: - return '' - - # is the user an editor? - if not isEditor(baseDir, nickname): - return '' - - postUrl = postUrl.replace('/', '#') - postFilename = locatePost(baseDir, nickname, domain, postUrl) - if not postFilename: - return '' - postJsonObject = loadJson(postFilename) - if not postJsonObject: - return '' - - cssFilename = baseDir + '/epicyon-links.css' - if os.path.isfile(baseDir + '/links.css'): - cssFilename = baseDir + '/links.css' - - editCSS = getCSS(baseDir, cssFilename, cssCache) - if editCSS: - if httpPrefix != 'https': - editCSS = \ - editCSS.replace('https://', httpPrefix + '://') - - editNewsPostForm = htmlHeader(cssFilename, editCSS) - editNewsPostForm += \ - '