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 596-601 sub execute_query { Link Here
596
    };
598
    };
597
    warn $@ if $@;
599
    warn $@ if $@;
598
600
601
    logaction( "REPORTS", "Run", $report_id, "$report_name | $sql " ) if C4::Context->preference("ReportsLog");
602
599
    return ( $sth, { queryerr => $sth->errstr } ) if ($sth->err);
603
    return ( $sth, { queryerr => $sth->errstr } ) if ($sth->err);
600
    return ( $sth );
604
    return ( $sth );
601
}
605
}
602
- 

Return to bug 27432