mirror of https://gitlab.com/bashrc2/epicyon
Debug
parent
233f8440c6
commit
634b66c59e
|
@ -1352,27 +1352,34 @@ def htmlEditNewsPost(translate: {}, baseDir: str, path: str,
|
||||||
httpPrefix: str, postUrl: str) -> str:
|
httpPrefix: str, postUrl: str) -> str:
|
||||||
"""Edits a news post
|
"""Edits a news post
|
||||||
"""
|
"""
|
||||||
|
print('TEST htmlEditNewsPost 1: ' + path)
|
||||||
if '/users/' not in path:
|
if '/users/' not in path:
|
||||||
return ''
|
return ''
|
||||||
|
print('TEST htmlEditNewsPost 2: ')
|
||||||
pathOriginal = path
|
pathOriginal = path
|
||||||
path = path.replace('/inbox', '').replace('/outbox', '')
|
path = path.replace('/inbox', '').replace('/outbox', '')
|
||||||
path = path.replace('/shares', '')
|
path = path.replace('/shares', '')
|
||||||
path = path.replace('/tlnews', '')
|
path = path.replace('/tlnews', '')
|
||||||
|
|
||||||
nickname = getNicknameFromActor(path)
|
nickname = getNicknameFromActor(path)
|
||||||
|
print('TEST htmlEditNewsPost 3: ' + str(nickname))
|
||||||
if not nickname:
|
if not nickname:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
# is the user an editor?
|
# is the user an editor?
|
||||||
|
print('TEST htmlEditNewsPost 4: ' + str(nickname))
|
||||||
if not isEditor(baseDir, nickname):
|
if not isEditor(baseDir, nickname):
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
postFilename = locatePost(baseDir, nickname, domain, postUrl)
|
postFilename = locatePost(baseDir, nickname, domain, postUrl)
|
||||||
|
print('TEST htmlEditNewsPost 5: ' + str(postFilename))
|
||||||
if not postFilename:
|
if not postFilename:
|
||||||
return ''
|
return ''
|
||||||
postJsonObject = loadJson(postFilename)
|
postJsonObject = loadJson(postFilename)
|
||||||
|
print('TEST htmlEditNewsPost 6: ' + str(postJsonObject))
|
||||||
if not postJsonObject:
|
if not postJsonObject:
|
||||||
return ''
|
return ''
|
||||||
|
print('TEST htmlEditNewsPost 7')
|
||||||
|
|
||||||
cssFilename = baseDir + '/epicyon-links.css'
|
cssFilename = baseDir + '/epicyon-links.css'
|
||||||
if os.path.isfile(baseDir + '/links.css'):
|
if os.path.isfile(baseDir + '/links.css'):
|
||||||
|
|
Loading…
Reference in New Issue