Bug 20261: Fix pagination of the results in authority search
[koha.git] / authorities / authorities-home.pl
index 89142f2..7c46794 100755 (executable)
@@ -94,18 +94,9 @@ if ( $op eq "do_search" ) {
         [$marclist], [$and_or], [$excluding], [$operator],
         [$value], $authtypecode, $orderby
     );
-    my $offset = ( $startfrom - 1 ) * $resultsperpage + 1;
-    my ( $results, $total ) =
-      $searcher->search_auth_compat( $search_query, $offset,
-        $resultsperpage );
-    #my ( $results, $total ) = SearchAuthorities(
-    #    [$marclist],  [$and_or],
-    #    [$excluding], [$operator],
-    #    [$value], ( $startfrom - 1 ) * $resultsperpage,
-    #    $resultsperpage, $authtypecode,
-    #    $orderby
-    #);
-
+    my ( $results, $total ) = $searcher->search_auth_compat(
+        $search_query, $startfrom, $resultsperpage
+    );
 
     ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         {