Lines 33-38
use C4::Branch; # XXX subfield_is_koha_internal_p
Link Here
|
33 |
use C4::Koha qw/IsAuthorisedValueCategory GetFrameworksLoop/; |
33 |
use C4::Koha qw/IsAuthorisedValueCategory GetFrameworksLoop/; |
34 |
use C4::Context; |
34 |
use C4::Context; |
35 |
use C4::Log; |
35 |
use C4::Log; |
|
|
36 |
use Koha::DateUtils qw/dt_from_string/; |
36 |
|
37 |
|
37 |
=head1 NAME |
38 |
=head1 NAME |
38 |
|
39 |
|
Lines 750-758
elsif ($phase eq 'Run this report'){
Link Here
|
750 |
my @split = split /<<|>>/,$sql; |
751 |
my @split = split /<<|>>/,$sql; |
751 |
my @tmpl_parameters; |
752 |
my @tmpl_parameters; |
752 |
for(my $i=0;$i<$#split/2;$i++) { |
753 |
for(my $i=0;$i<$#split/2;$i++) { |
753 |
my $quoted = C4::Context->dbh->quote($sql_params[$i]); |
754 |
my $quoted = $sql_params[$i]; |
754 |
# if there are special regexp chars, we must \ them |
755 |
# if there are special regexp chars, we must \ them |
755 |
$split[$i*2+1] =~ s/(\||\?|\.|\*|\(|\)|\%)/\\$1/g; |
756 |
$split[$i*2+1] =~ s/(\||\?|\.|\*|\(|\)|\%)/\\$1/g; |
|
|
757 |
if ($split[$i*2+1] =~ /|date>>/) { |
758 |
$quoted = substr(dt_from_string($quoted),0,10); |
759 |
} |
760 |
$quoted = C4::Context->dbh->quote($quoted); |
756 |
$sql =~ s/<<$split[$i*2+1]>>/$quoted/; |
761 |
$sql =~ s/<<$split[$i*2+1]>>/$quoted/; |
757 |
} |
762 |
} |
758 |
my ($sth, $errors) = execute_query($sql, $offset, $limit); |
763 |
my ($sth, $errors) = execute_query($sql, $offset, $limit); |
759 |
- |
|
|