forked from indymedia/epicyon
Fix the counting of posts
parent
a117b21009
commit
70a9fb0929
3
posts.py
3
posts.py
|
@ -1857,11 +1857,11 @@ def createBoxBase(baseDir: str,boxname: str, \
|
||||||
isPost=False
|
isPost=False
|
||||||
|
|
||||||
if isPost:
|
if isPost:
|
||||||
|
isTimelinePost=False
|
||||||
if currPage == pageNumber and postsOnPageCtr <= itemsPerPage:
|
if currPage == pageNumber and postsOnPageCtr <= itemsPerPage:
|
||||||
# get the post as json
|
# get the post as json
|
||||||
p = json.loads(postStr)
|
p = json.loads(postStr)
|
||||||
|
|
||||||
isTimelinePost=False
|
|
||||||
if (boxname!='dm' and boxname!='tlreplies'):
|
if (boxname!='dm' and boxname!='tlreplies'):
|
||||||
isTimelinePost=True
|
isTimelinePost=True
|
||||||
else:
|
else:
|
||||||
|
@ -1903,6 +1903,7 @@ def createBoxBase(baseDir: str,boxname: str, \
|
||||||
if postsOnPageCtr >= itemsPerPage:
|
if postsOnPageCtr >= itemsPerPage:
|
||||||
break
|
break
|
||||||
# count the pages
|
# count the pages
|
||||||
|
if isTimelinePost:
|
||||||
postsCtr += 1
|
postsCtr += 1
|
||||||
if postsCtr >= itemsPerPage:
|
if postsCtr >= itemsPerPage:
|
||||||
postsCtr = 0
|
postsCtr = 0
|
||||||
|
|
Loading…
Reference in New Issue