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

(-)a/C4/Reports/Guided.pm (-1 / +4 lines)
Lines 542-547 sub execute_query { Link Here
542
    my ( $sql, $offset, $limit, $sql_params, $report_id ) = @_;
542
    my ( $sql, $offset, $limit, $sql_params, $report_id ) = @_;
543
543
544
    $sql_params = [] unless defined $sql_params;
544
    $sql_params = [] unless defined $sql_params;
545
    my $report = Koha::Reports->find($report_id) if $report_id;
546
    my $report_name = $report ? $report->report_name : 'Unknown report';
545
547
546
    # check parameters
548
    # check parameters
547
    unless ($sql) {
549
    unless ($sql) {
Lines 594-599 sub execute_query { Link Here
594
    };
596
    };
595
    warn $@ if $@;
597
    warn $@ if $@;
596
598
599
    logaction( "REPORTS", "Run", $report_id, "$report_name | $sql " ) if C4::Context->preference("ReportsLog");
600
597
    return ( $sth, { queryerr => $sth->errstr } ) if ($sth->err);
601
    return ( $sth, { queryerr => $sth->errstr } ) if ($sth->err);
598
    return ( $sth );
602
    return ( $sth );
599
}
603
}
600
- 

Return to bug 27432