mirror of https://gitlab.com/bashrc2/epicyon
Allow for citations to be removed
parent
3de8da92ae
commit
cbdd2357c5
10
daemon.py
10
daemon.py
|
@ -3058,6 +3058,13 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
"""Updates the citations for a blog post after hitting
|
"""Updates the citations for a blog post after hitting
|
||||||
update button on the citations screen
|
update button on the citations screen
|
||||||
"""
|
"""
|
||||||
|
citationsFilename = \
|
||||||
|
baseDir + '/accounts/' + \
|
||||||
|
nickname + '@' + domain + '/.citations.txt'
|
||||||
|
# remove any existing citations file
|
||||||
|
if os.path.isfile(citationsFilename):
|
||||||
|
os.remove(citationsFilename)
|
||||||
|
|
||||||
usersPath = path.replace('/citationsdata', '')
|
usersPath = path.replace('/citationsdata', '')
|
||||||
actorStr = httpPrefix + '://' + domainFull + usersPath
|
actorStr = httpPrefix + '://' + domainFull + usersPath
|
||||||
if newswire and \
|
if newswire and \
|
||||||
|
@ -3122,9 +3129,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
citations.append(fields[fieldName])
|
citations.append(fields[fieldName])
|
||||||
|
|
||||||
if citations:
|
if citations:
|
||||||
citationsFilename = \
|
|
||||||
baseDir + '/accounts/' + \
|
|
||||||
nickname + '@' + domain + '/.citations.txt'
|
|
||||||
citationsStr = ''
|
citationsStr = ''
|
||||||
for citationDate in citations:
|
for citationDate in citations:
|
||||||
citationsStr += citationDate + '\n'
|
citationsStr += citationDate + '\n'
|
||||||
|
|
Loading…
Reference in New Issue