diff --git a/opac/svc/report b/opac/svc/report index f83b12e70e..e33b84182f 100755 --- a/opac/svc/report +++ b/opac/svc/report @@ -39,7 +39,7 @@ if (!$report_rec) { die "There is no such report.\n"; } die "Sorry this report is not public\n" unless $report_rec->{public}; -my @sql_params = $query->param('sql_params'); +my @sql_params = $query->multi_param('sql_params'); my $cache = Koha::Caches->get_instance(); my $cache_active = $cache->is_cache_active; @@ -47,7 +47,7 @@ my ($cache_key, $json_text); if ($cache_active) { $cache_key = "opac:report:" - . ( $report_name ? "name:$report_name" : "id:$report_id" ) + . ( $report_name ? "name:$report_name:" : "id:$report_id:" ) . join( '-', @sql_params ); $json_text = $cache->get_from_cache($cache_key); } diff --git a/svc/report b/svc/report index 0188eaadd7..252a6ed0de 100755 --- a/svc/report +++ b/svc/report @@ -36,7 +36,7 @@ my $report_annotation = $query->param('annotated'); my $report_rec = get_saved_report( $report_name ? { 'name' => $report_name } : { 'id' => $report_id } ); if (!$report_rec) { die "There is no such report.\n"; } -my @sql_params = $query->param('sql_params'); +my @sql_params = $query->multi_param('sql_params'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { @@ -52,7 +52,7 @@ my $cache = Koha::Caches->get_instance(); my $cache_active = $cache->is_cache_active; my ($cache_key, $json_text); if ($cache_active) { - $cache_key = "intranet:report:".($report_name ? "name:$report_name" : "id:$report_id") + $cache_key = "intranet:report:".($report_name ? "name:$report_name:" : "id:$report_id:") . join( '-', @sql_params ); $json_text = $cache->get_from_cache($cache_key); }