forked from indymedia/epicyon
Remove debug
parent
a33c918936
commit
2945bdb7bb
|
@ -3029,9 +3029,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if fields.get('editedNewsPost'):
|
if fields.get('editedNewsPost'):
|
||||||
newsPostContent = fields['editedNewsPost']
|
newsPostContent = fields['editedNewsPost']
|
||||||
|
|
||||||
print('TEST newsPostUrl ' + str(newsPostUrl))
|
|
||||||
print('TEST newsPostTitle ' + str(newsPostTitle))
|
|
||||||
print('TEST newsPostUrl ' + str(newsPostUrl))
|
|
||||||
if newsPostUrl and newsPostContent and newsPostTitle:
|
if newsPostUrl and newsPostContent and newsPostTitle:
|
||||||
# load the post
|
# load the post
|
||||||
postFilename = \
|
postFilename = \
|
||||||
|
@ -3049,7 +3046,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
baseDir + '/accounts/' + \
|
baseDir + '/accounts/' + \
|
||||||
nickname + '@' + domain + \
|
nickname + '@' + domain + \
|
||||||
'/postcache/' + newsPostUrl + '.html'
|
'/postcache/' + newsPostUrl + '.html'
|
||||||
print('TEST cachedPost ' + cachedPost)
|
|
||||||
if os.path.isfile(cachedPost):
|
if os.path.isfile(cachedPost):
|
||||||
os.remove(cachedPost)
|
os.remove(cachedPost)
|
||||||
# update newswire
|
# update newswire
|
||||||
|
@ -8238,8 +8234,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
postUrl = httpPrefix + '://' + domainFull + \
|
postUrl = httpPrefix + '://' + domainFull + \
|
||||||
'/users/news/statuses/' + postId
|
'/users/news/statuses/' + postId
|
||||||
path = path.split('/editnewspost=')[0]
|
path = path.split('/editnewspost=')[0]
|
||||||
print('TEST path: ' + path)
|
|
||||||
print('TEST postUrl: ' + postUrl)
|
|
||||||
msg = htmlEditNewsPost(translate, baseDir,
|
msg = htmlEditNewsPost(translate, baseDir,
|
||||||
path, domain, port,
|
path, domain, port,
|
||||||
httpPrefix,
|
httpPrefix,
|
||||||
|
|
|
@ -1356,32 +1356,25 @@ 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
|
||||||
|
|
||||||
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 ''
|
||||||
|
|
||||||
postUrl = postUrl.replace('/', '#')
|
postUrl = postUrl.replace('/', '#')
|
||||||
postFilename = locatePost(baseDir, nickname, domain, postUrl)
|
postFilename = locatePost(baseDir, nickname, domain, postUrl)
|
||||||
print('TEST htmlEditNewsPost 5: ' + str(postFilename) + ' ' + postUrl)
|
|
||||||
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'):
|
||||||
|
@ -6142,6 +6135,14 @@ def htmlTimeline(defaultTimeline: str,
|
||||||
'" alt="| ' + translate['Show/Hide Buttons'] + \
|
'" alt="| ' + translate['Show/Hide Buttons'] + \
|
||||||
'" class="timelineicon"/></a>\n'
|
'" class="timelineicon"/></a>\n'
|
||||||
|
|
||||||
|
# the newswire button to show right column links
|
||||||
|
tlStr += \
|
||||||
|
' <a class="imageAnchorMobile" href="' + usersPath + '/newswire' + \
|
||||||
|
'"><img loading="lazy" src="/' + iconsDir + \
|
||||||
|
'/newswire.png" title="' + translate['News'] + \
|
||||||
|
'" alt="| ' + translate['News'] + \
|
||||||
|
'" class="timelineicon"/></a>\n'
|
||||||
|
|
||||||
# the links button to show left column links
|
# the links button to show left column links
|
||||||
tlStr += \
|
tlStr += \
|
||||||
' <a class="imageAnchorMobile" href="' + usersPath + '/links' + \
|
' <a class="imageAnchorMobile" href="' + usersPath + '/links' + \
|
||||||
|
|
Loading…
Reference in New Issue