View | Details | Raw Unified | Return to bug 21115
Collapse All | Expand All

(-)a/opac/svc/report (-2 / +2 lines)
Lines 41-47 my $report_rec = $report_recs->next(); Link Here
41
41
42
die "Sorry this report is not public\n" unless $report_rec->public;
42
die "Sorry this report is not public\n" unless $report_rec->public;
43
43
44
my @sql_params  = $query->param('sql_params');
44
my @sql_params  = $query->multi_param('sql_params');
45
45
46
my $cache = Koha::Caches->get_instance();
46
my $cache = Koha::Caches->get_instance();
47
my $cache_active = $cache->is_cache_active;
47
my $cache_active = $cache->is_cache_active;
Lines 49-55 my ($cache_key, $json_text); Link Here
49
if ($cache_active) {
49
if ($cache_active) {
50
    $cache_key =
50
    $cache_key =
51
        "opac:report:"
51
        "opac:report:"
52
      . ( $report_name ? "name:$report_name" : "id:$report_id" )
52
      . ( $report_name ? "name:$report_name:" : "id:$report_id:" )
53
      . join( '-', @sql_params );
53
      . join( '-', @sql_params );
54
    $json_text = $cache->get_from_cache($cache_key);
54
    $json_text = $cache->get_from_cache($cache_key);
55
}
55
}
(-)a/svc/report (-3 / +2 lines)
Lines 38-44 my $report_recs = Koha::Reports->search( $report_name ? { 'report_name' => $repo Link Here
38
if (!$report_recs || $report_recs->count == 0 ) { die "There is no such report.\n"; }
38
if (!$report_recs || $report_recs->count == 0 ) { die "There is no such report.\n"; }
39
my $report_rec = $report_recs->next();
39
my $report_rec = $report_recs->next();
40
40
41
my @sql_params  = $query->param('sql_params');
41
my @sql_params  = $query->multi_param('sql_params');
42
42
43
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
43
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
44
    {
44
    {
Lines 54-60 my $cache = Koha::Caches->get_instance(); Link Here
54
my $cache_active = $cache->is_cache_active;
54
my $cache_active = $cache->is_cache_active;
55
my ($cache_key, $json_text);
55
my ($cache_key, $json_text);
56
if ($cache_active) {
56
if ($cache_active) {
57
    $cache_key = "intranet:report:".($report_name ? "report_name:$report_name" : "id:$report_id")
57
    $cache_key = "intranet:report:".($report_name ? "report_name:$report_name:" : "id:$report_id:")
58
    . join( '-', @sql_params );
58
    . join( '-', @sql_params );
59
    $json_text = $cache->get_from_cache($cache_key);
59
    $json_text = $cache->get_from_cache($cache_key);
60
}
60
}
61
- 

Return to bug 21115