forked from indymedia/epicyon
Remove debug
parent
a33c918936
commit
2945bdb7bb
|
@ -3029,9 +3029,6 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if fields.get('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:
|
||||
# load the post
|
||||
postFilename = \
|
||||
|
@ -3049,7 +3046,6 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
baseDir + '/accounts/' + \
|
||||
nickname + '@' + domain + \
|
||||
'/postcache/' + newsPostUrl + '.html'
|
||||
print('TEST cachedPost ' + cachedPost)
|
||||
if os.path.isfile(cachedPost):
|
||||
os.remove(cachedPost)
|
||||
# update newswire
|
||||
|
@ -8238,8 +8234,6 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
postUrl = httpPrefix + '://' + domainFull + \
|
||||
'/users/news/statuses/' + postId
|
||||
path = path.split('/editnewspost=')[0]
|
||||
print('TEST path: ' + path)
|
||||
print('TEST postUrl: ' + postUrl)
|
||||
msg = htmlEditNewsPost(translate, baseDir,
|
||||
path, domain, port,
|
||||
httpPrefix,
|
||||
|
|
|
@ -1356,32 +1356,25 @@ def htmlEditNewsPost(translate: {}, baseDir: str, path: str,
|
|||
httpPrefix: str, postUrl: str) -> str:
|
||||
"""Edits a news post
|
||||
"""
|
||||
print('TEST htmlEditNewsPost 1: ' + path)
|
||||
if '/users/' not in path:
|
||||
return ''
|
||||
print('TEST htmlEditNewsPost 2: ')
|
||||
pathOriginal = path
|
||||
|
||||
nickname = getNicknameFromActor(path)
|
||||
print('TEST htmlEditNewsPost 3: ' + str(nickname))
|
||||
if not nickname:
|
||||
return ''
|
||||
|
||||
# is the user an editor?
|
||||
print('TEST htmlEditNewsPost 4: ' + str(nickname))
|
||||
if not isEditor(baseDir, nickname):
|
||||
return ''
|
||||
|
||||
postUrl = postUrl.replace('/', '#')
|
||||
postFilename = locatePost(baseDir, nickname, domain, postUrl)
|
||||
print('TEST htmlEditNewsPost 5: ' + str(postFilename) + ' ' + postUrl)
|
||||
if not postFilename:
|
||||
return ''
|
||||
postJsonObject = loadJson(postFilename)
|
||||
print('TEST htmlEditNewsPost 6: ' + str(postJsonObject))
|
||||
if not postJsonObject:
|
||||
return ''
|
||||
print('TEST htmlEditNewsPost 7')
|
||||
|
||||
cssFilename = baseDir + '/epicyon-links.css'
|
||||
if os.path.isfile(baseDir + '/links.css'):
|
||||
|
@ -6142,6 +6135,14 @@ def htmlTimeline(defaultTimeline: str,
|
|||
'" alt="| ' + translate['Show/Hide Buttons'] + \
|
||||
'" 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
|
||||
tlStr += \
|
||||
' <a class="imageAnchorMobile" href="' + usersPath + '/links' + \
|
||||
|
|
Loading…
Reference in New Issue