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

(-)a/C4/Reports/Guided.pm (-1 / +1 lines)
Lines 642-648 sub delete_report { Link Here
642
    return unless @ids;
642
    return unless @ids;
643
    foreach my $id (@ids) {
643
    foreach my $id (@ids) {
644
        my $data = get_saved_report($id);
644
        my $data = get_saved_report($id);
645
        logaction( "REPORTS", "DELETE", $id, "Name: $data->{'report_name'} SQL: $data->{'savedsql'}  " ) if C4::Context->preference("ReportsLog");
645
        logaction( "REPORTS", "DELETE", $id, "$data->{'report_name'} | $data->{'savedsql'}  " ) if C4::Context->preference("ReportsLog");
646
    }
646
    }
647
    my $dbh = C4::Context->dbh;
647
    my $dbh = C4::Context->dbh;
648
    my $query = 'DELETE FROM saved_sql WHERE id IN (' . join( ',', ('?') x @ids ) . ')';
648
    my $query = 'DELETE FROM saved_sql WHERE id IN (' . join( ',', ('?') x @ids ) . ')';
(-)a/reports/guided_reports.pl (-3 / +2 lines)
Lines 239-245 elsif ( $phase eq 'Update SQL'){ Link Here
239
                'reportname'            => $reportname,
239
                'reportname'            => $reportname,
240
                'id'                    => $id,
240
                'id'                    => $id,
241
            );
241
            );
242
            logaction( "REPORTS", "MODIFY", $id, "$reportname: SQL: $sql" ) if C4::Context->preference("ReportsLog");
242
            logaction( "REPORTS", "MODIFY", $id, "$reportname | $sql" ) if C4::Context->preference("ReportsLog");
243
        }
243
        }
244
        if ( $usecache ) {
244
        if ( $usecache ) {
245
            $template->param(
245
            $template->param(
Lines 597-603 elsif ( $phase eq 'Save Report' ) { Link Here
597
                    cache_expiry   => $cache_expiry,
597
                    cache_expiry   => $cache_expiry,
598
                    public         => $public,
598
                    public         => $public,
599
                } );
599
                } );
600
                logaction( "REPORTS", "ADD", 0, "Name: $name: SQL: $sql" ) if C4::Context->preference("ReportsLog");
600
                logaction( "REPORTS", "ADD", $id, "$name | $sql" ) if C4::Context->preference("ReportsLog");
601
            $template->param(
601
            $template->param(
602
                'save_successful' => 1,
602
                'save_successful' => 1,
603
                'reportname'      => $name,
603
                'reportname'      => $name,
604
- 

Return to bug 14024