1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 10:58:33 +00:00

Fixed bug in publinkadmin pagination

This commit is contained in:
zhengxie
2013-08-14 11:45:41 +08:00
parent 920e80099c
commit 5559d75e38

View File

@@ -393,8 +393,10 @@ def sys_publink_admin(request):
current_page = 1
per_page = 100
publinks = FileShare.objects.all()[per_page * (current_page -1):
per_page + 1]
offset = per_page * (current_page -1)
limit = per_page + 1
publinks = FileShare.objects.all()[offset:offset+limit]
if len(publinks) == per_page + 1:
page_next = True
else: