Skip to content
Permalink
Browse files

Properly fill current page number to new server side pagination template

When current page is automatically reset to zero because of a new search
request.
  • Loading branch information...
luccioman committed Mar 5, 2019
1 parent 384c371 commit 093ea9586c2eb84df56d32d826e67c8dfdd0efdb
Showing with 2 additions and 2 deletions.
  1. +1 −1 htroot/yacysearch.html
  2. +1 −1 htroot/yacysearchpagination.java
@@ -255,7 +255,7 @@ <h4 class="linktitle">
#(resultTable)#::</table>::</table>#(/resultTable)#
<!-- linklist end -->

<!--#include virtual="yacysearchpagination.html?eventID=#[eventID]#&maximumRecords=#[count]#&jsResort=#(jsResort)#false::true#(/jsResort)##(authSearch)#::&auth#(/authSearch)#" -->
<!--#include virtual="yacysearchpagination.html?eventID=#[eventID]#&maximumRecords=#[count]#&offset=#[offset]#&jsResort=#(jsResort)#false::true#(/jsResort)##(authSearch)#::&auth#(/authSearch)#" -->

</div> <!-- close main -->

@@ -81,7 +81,7 @@ public static serverObjects respond(final RequestHeader header, final serverObje
prop.put("pagination_pages", 0);
prop.put("pagination_nextDisabled", true);
} else {
final int startRecord = post.getInt("startRecord", post.getInt("offset", post.getInt("start", 0)));
final int startRecord = post.getInt("offset", 0);
final int totalCount = theSearch.getResultCount();

final int activePage = (int) Math.floor(startRecord / (double) itemsPerPage);

0 comments on commit 093ea95

Please sign in to comment.
You can’t perform that action at this time.