diff --git a/authorities/authorities-home.pl b/authorities/authorities-home.pl index 426b1bace3..6e0a8fe88d 100755 --- a/authorities/authorities-home.pl +++ b/authorities/authorities-home.pl @@ -87,9 +87,9 @@ if ( $op eq "do_search" ) { [$marclist], [$and_or], [$excluding], [$operator], [$value], $authtypecode, $orderby ); - $startfrom = $startfrom // 0; + my $offset = ( $startfrom - 1 ) * $resultsperpage + 1; my ( $results, $total ) = - $searcher->search_auth_compat( $search_query, $startfrom, + $searcher->search_auth_compat( $search_query, $offset, $resultsperpage ); #my ( $results, $total ) = SearchAuthorities( # [$marclist], [$and_or], diff --git a/opac/opac-authorities-home.pl b/opac/opac-authorities-home.pl index 5b1a42b341..d92166bea6 100755 --- a/opac/opac-authorities-home.pl +++ b/opac/opac-authorities-home.pl @@ -64,8 +64,9 @@ if ( $op eq "do_search" ) { { index => $Koha::SearchEngine::AUTHORITIES_INDEX } ); my $search_query = $builder->build_authorities_query_compat( \@marclist, \@and_or, \@excluding, \@operator, \@value, $authtypecode, $orderby ); + my $offset = ( $startfrom - 1 ) * $resultsperpage + 1; my ( $results, $total ) = - $searcher->search_auth_compat( $search_query, $startfrom, $resultsperpage ); + $searcher->search_auth_compat( $search_query, $offset, $resultsperpage ); ( $template, $loggedinuser, $cookie ) = get_template_and_user( { template_name => "opac-authoritiessearchresultlist.tt",