Bug 4470 Patron search result pagination bar

Obviously, Koha global pagination function could be improved. This patch
do something which belongs to this function. A CPAN module like
Data::Page could help or be an inspiration... 3.4?

There is also room for improvement in they way resultset are
constructed. The whole set is retrieved and just a subset is displayed.
It impacts performances for libraries with a great number of patrons.
The right solution would be:

  - to find the resultset size with SELECT COUNT(*)
  - to retrieved the exact subset with LIMIT and OFFSET SQL arguments

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
Frédéric Demians 2010-05-08 08:27:51 +02:00 committed by Chris Cormack
parent b4eb19b6d3
commit 089e23786d
1 changed files with 2 additions and 1 deletions

View File

@ -147,7 +147,8 @@ $template->param( letters => \@letters );
$template->param(
paginationbar => pagination_bar(
$base_url, int( $count / $resultsperpage ) + 1,
$base_url,
int( $count / $resultsperpage ) + ($count % $resultsperpage ? 1 : 0),
$startfrom, 'startfrom'
),
startfrom => $startfrom,