Bug 21984: Pass param_name in pagination URL
[koha.git] / reports / guided_reports.pl
index 4a0e405..24dd108 100755 (executable)
@@ -829,9 +829,13 @@ elsif ($phase eq 'Run this report'){
 
             my $totpages = int($total/$limit) + (($total % $limit) > 0 ? 1 : 0);
             my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report_id&phase=Run%20this%20report&limit=$limit";
+            if (@param_names) {
+                $url = join('&param_name=', $url, map { URI::Escape::uri_escape_utf8($_) } @param_names);
+            }
             if (@sql_params) {
                 $url = join('&sql_params=', $url, map { URI::Escape::uri_escape_utf8($_) } @sql_params);
             }
+
             $template->param(
                 'results' => \@rows,
                 'allresults' => \@allrows,