Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
bug 6409: fix pagination of SQL report output when parameters are used
Fixes bug where paging through output of an SQL report that includes
one or more parameters fails by asking you for the parameter values
and again and sending you back to the first page of results.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
  • Loading branch information
gmcharlt authored and ranginui committed Jun 9, 2011
1 parent 5829cef commit 577ce72
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions reports/guided_reports.pl
Expand Up @@ -21,6 +21,7 @@
#use warnings; FIXME - Bug 2505
use CGI;
use Text::CSV;
use URI::Escape;
use C4::Reports::Guided;
use C4::Auth qw/:DEFAULT get_session/;
use C4::Output;
Expand Down Expand Up @@ -521,6 +522,9 @@ =head1 DESCRIPTION
my $totpages = int($total/$limit) + (($total % $limit) > 0 ? 1 : 0);
my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report&amp;phase=Run%20this%20report";
if (@sql_params) {
$url = join('&amp;sql_params=', $url, map { URI::Escape::uri_escape($_) } @sql_params);
}
$template->param(
'results' => \@rows,
'sql' => $sql,
Expand Down

0 comments on commit 577ce72

Please sign in to comment.