Lines 619-626
for (my $i=0;$i<@servers;$i++) {
Link Here
|
619 |
## FIXME: add a global function for this, it's better than the current global one |
619 |
## FIXME: add a global function for this, it's better than the current global one |
620 |
## Build the page numbers on the bottom of the page |
620 |
## Build the page numbers on the bottom of the page |
621 |
my @page_numbers; |
621 |
my @page_numbers; |
|
|
622 |
my $hits_to_paginate = C4::Context->preference('SearchEngine') eq 'Elasticsearch' ? 10000 : $hits; |
622 |
# total number of pages there will be |
623 |
# total number of pages there will be |
623 |
my $pages = ceil($hits / $results_per_page); |
624 |
my $pages = ceil($hits_to_paginate / $results_per_page); |
624 |
my $last_page_offset = ( $pages -1 ) * $results_per_page; |
625 |
my $last_page_offset = ( $pages -1 ) * $results_per_page; |
625 |
# default page number |
626 |
# default page number |
626 |
my $current_page_number = 1; |
627 |
my $current_page_number = 1; |