Getting page number

main
Bob Mottram 2020-10-07 20:49:57 +01:00
parent f2fbccd014
commit 6c71349c0b
1 changed files with 3 additions and 1 deletions

View File

@ -6513,7 +6513,8 @@ class PubServer(BaseHTTPRequestHandler):
if not inboxNewsFeed: if not inboxNewsFeed:
inboxNewsFeed = [] inboxNewsFeed = []
if self._requestHTTP(): if self._requestHTTP():
nickname = 'news' nickname = path.replace('/users/', '')
nickname = nickname.replace('/tlnews', '')
pageNumber = 1 pageNumber = 1
if '?page=' in nickname: if '?page=' in nickname:
pageNumber = nickname.split('?page=')[1] pageNumber = nickname.split('?page=')[1]
@ -6522,6 +6523,7 @@ class PubServer(BaseHTTPRequestHandler):
pageNumber = int(pageNumber) pageNumber = int(pageNumber)
else: else:
pageNumber = 1 pageNumber = 1
nickname = 'news'
if 'page=' not in path: if 'page=' not in path:
# if no page was specified then show the first # if no page was specified then show the first
inboxNewsFeed = \ inboxNewsFeed = \