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 584-589 sub execute_query { Link Here
584
    };
586
    };
585
    warn $@ if $@;
587
    warn $@ if $@;
586
588
589
    logaction( "REPORTS", "Run", $report_id, "$report_name | $sql " ) if C4::Context->preference("ReportsLog");
590
587
    return ( $sth, { queryerr => $sth->errstr } ) if ($sth->err);
591
    return ( $sth, { queryerr => $sth->errstr } ) if ($sth->err);
588
    return ( $sth );
592
    return ( $sth );
589
}
593
}
590
- 

Return to bug 27432