Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.6
-
None
-
None
-
Operating System: All
Platform: All
-
32728
Description
Using SearchGenerator,when come to page 2,has-previous is false,but after page
2 it return true.The problem is cause by LuceneCocoonPager.java,method
hasPrevious(),line 189:
return hitsIndex > countOfHitsPerPage;
Because index start with 0,the second page is 10 when 10/page,then 10>10 is
false.
Solution:
change to return hitsIndex >= countOfHitsPerPage
or make index start with 1,this is the better solution.
2 it return true.The problem is cause by LuceneCocoonPager.java,method
hasPrevious(),line 189:
return hitsIndex > countOfHitsPerPage;
Because index start with 0,the second page is 10 when 10/page,then 10>10 is
false.
Solution:
change to return hitsIndex >= countOfHitsPerPage
or make index start with 1,this is the better solution.