forked from indymedia/epicyon
Comment
parent
3badf3ad57
commit
71915b8c94
4
blog.py
4
blog.py
|
@ -85,7 +85,7 @@ def noOfBlogReplies(baseDir: str, httpPrefix: str, translate: {},
|
||||||
def getBlogReplies(baseDir: str, httpPrefix: str, translate: {},
|
def getBlogReplies(baseDir: str, httpPrefix: str, translate: {},
|
||||||
nickname: str, domain: str, domainFull: str,
|
nickname: str, domain: str, domainFull: str,
|
||||||
postId: str, depth=0) -> str:
|
postId: str, depth=0) -> str:
|
||||||
"""Returns the number of replies on the post
|
"""Returns a string containing html blog posts
|
||||||
"""
|
"""
|
||||||
if depth > 4:
|
if depth > 4:
|
||||||
return ''
|
return ''
|
||||||
|
@ -106,7 +106,7 @@ def getBlogReplies(baseDir: str, httpPrefix: str, translate: {},
|
||||||
for postBox in tryPostBox:
|
for postBox in tryPostBox:
|
||||||
postFilename = baseDir + '/accounts/' + \
|
postFilename = baseDir + '/accounts/' + \
|
||||||
nickname + '@' + domain + '/' + postBox + '/' + \
|
nickname + '@' + domain + '/' + postBox + '/' + \
|
||||||
postId.replace('/', '#')
|
postId.replace('/', '#') + '.json'
|
||||||
if os.path.isfile(postFilename):
|
if os.path.isfile(postFilename):
|
||||||
postFilename = baseDir + '/accounts/' + \
|
postFilename = baseDir + '/accounts/' + \
|
||||||
nickname + '@' + domain + \
|
nickname + '@' + domain + \
|
||||||
|
|
|
@ -1295,7 +1295,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if blogFilename and nickname:
|
if blogFilename and nickname:
|
||||||
postJsonObject = loadJson(blogFilename)
|
postJsonObject = loadJson(blogFilename)
|
||||||
if isBlogPost(postJsonObject):
|
if isBlogPost(postJsonObject):
|
||||||
msg = htmlBlogPost(True,
|
msg = htmlBlogPost(authorized,
|
||||||
self.server.baseDir,
|
self.server.baseDir,
|
||||||
self.server.httpPrefix,
|
self.server.httpPrefix,
|
||||||
self.server.translate,
|
self.server.translate,
|
||||||
|
|
Loading…
Reference in New Issue