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.
pull/292/head
luccioman 6 years ago
parent 384c37102c
commit 093ea9586c

@ -255,7 +255,7 @@ document.getElementById("Enter").innerHTML = "search again";
#(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 class yacysearchpagination {
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);

Loading…
Cancel
Save