forked from MarseyWorld/MarseyWorld
master
parent
eb674ea051
commit
2e7f4ae1e6
|
@ -279,7 +279,7 @@ def searchusers(v):
|
||||||
total=users.count()
|
total=users.count()
|
||||||
|
|
||||||
users=[x for x in users.offset(25 * (page-1)).limit(26)]
|
users=[x for x in users.offset(25 * (page-1)).limit(26)]
|
||||||
next_exists=(len(users)==26)
|
next_exists=(len(users)>25)
|
||||||
users=users[:25]
|
users=users[:25]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -175,7 +175,7 @@ def log(v):
|
||||||
if v and v.admin_level == 6: actions = g.db.query(ModAction).order_by(ModAction.id.desc()).offset(25 * (page - 1)).limit(26).all()
|
if v and v.admin_level == 6: actions = g.db.query(ModAction).order_by(ModAction.id.desc()).offset(25 * (page - 1)).limit(26).all()
|
||||||
else: actions=g.db.query(ModAction).filter(ModAction.kind!="shadowban", ModAction.kind!="unshadowban", ModAction.kind!="club", ModAction.kind!="unclub").order_by(ModAction.id.desc()).offset(25*(page-1)).limit(26).all()
|
else: actions=g.db.query(ModAction).filter(ModAction.kind!="shadowban", ModAction.kind!="unshadowban", ModAction.kind!="club", ModAction.kind!="unclub").order_by(ModAction.id.desc()).offset(25*(page-1)).limit(26).all()
|
||||||
|
|
||||||
next_exists=len(actions)==26
|
next_exists=len(actions)>25
|
||||||
actions=actions[:25]
|
actions=actions[:25]
|
||||||
|
|
||||||
return render_template("log.html", v=v, actions=actions, next_exists=next_exists, page=page)
|
return render_template("log.html", v=v, actions=actions, next_exists=next_exists, page=page)
|
||||||
|
|
|
@ -700,7 +700,7 @@ def saved_posts(v, username):
|
||||||
|
|
||||||
ids=v.saved_idlist(page=page)
|
ids=v.saved_idlist(page=page)
|
||||||
|
|
||||||
next_exists=len(ids)==26
|
next_exists=len(ids)>25
|
||||||
|
|
||||||
ids=ids[:25]
|
ids=ids[:25]
|
||||||
|
|
||||||
|
@ -722,14 +722,17 @@ def saved_comments(v, username):
|
||||||
|
|
||||||
page=int(request.values.get("page",1))
|
page=int(request.values.get("page",1))
|
||||||
|
|
||||||
ids=v.saved_comment_idlist(page=page)
|
firstrange = 25 * (page - 1)
|
||||||
|
secondrange = firstrange+26
|
||||||
|
|
||||||
next_exists=len(ids)==26
|
ids=v.saved_comment_idlist()[firstrange:secondrange]
|
||||||
|
|
||||||
|
next_exists=len(ids) > 25
|
||||||
|
|
||||||
ids=ids[:25]
|
ids=ids[:25]
|
||||||
|
|
||||||
print(ids)
|
print(ids)
|
||||||
|
|
||||||
listing = get_comments(ids, v=v)
|
listing = get_comments(ids, v=v)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue