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

(-)a/reports/guided_reports.pl (-1 / +1 lines)
Lines 1091-1096 sub get_prepped_report { Link Here
1091
    for(my $i=0;$i<$#split/2;$i++){ #The placeholders are always the odd elements of the array
1091
    for(my $i=0;$i<$#split/2;$i++){ #The placeholders are always the odd elements of the array
1092
        my ($type,$name) = split /\|/,$split[$i*2+1]; # We split them on '|'
1092
        my ($type,$name) = split /\|/,$split[$i*2+1]; # We split them on '|'
1093
        $headers->{$name} = $type; # Store as a lookup for the template
1093
        $headers->{$name} = $type; # Store as a lookup for the template
1094
        $headers->{$name} =~ s/^\w*\.//; # strip the table name just as in $sth->{NAME} array
1094
        $split[$i*2+1] =~ s/(\||\?|\.|\*|\(|\)|\%)/\\$1/g; #Quote any special characters so we can replace the placeholders
1095
        $split[$i*2+1] =~ s/(\||\?|\.|\*|\(|\)|\%)/\\$1/g; #Quote any special characters so we can replace the placeholders
1095
        $name = C4::Context->dbh->quote($name);
1096
        $name = C4::Context->dbh->quote($name);
1096
        $sql =~ s/\[\[$split[$i*2+1]\]\]/$type AS $name/; # Remove placeholders from SQL
1097
        $sql =~ s/\[\[$split[$i*2+1]\]\]/$type AS $name/; # Remove placeholders from SQL
1097
- 

Return to bug 24305