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