From 257a179c3eecd252155e0904605a61f860bfe2d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Sat, 8 May 2010 08:27:51 +0200 Subject: [PATCH] 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 --- members/member.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/members/member.pl b/members/member.pl index 58485b634f..e92ab434de 100755 --- a/members/member.pl +++ b/members/member.pl @@ -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, -- 2.39.5