Browse Source

Bug 24305: (follow-up) Add small comment for square brackets in get_prepped_report

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Marcel de Rooy 4 years ago
committed by Martin Renvoize
parent
commit
c3e96a900b
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 3
      reports/guided_reports.pl

3
reports/guided_reports.pl

@ -1083,6 +1083,9 @@ sub get_prepped_report {
my ($sql, $param_names, $sql_params ) = @_;
# First we split out the placeholders
# This part of the code supports using [[ table.field | alias ]] in the
# query and replaces it by table.field AS alias. Not sure why we would
# need it if we can type the latter (which is simpler)?
my @split = split /\[\[|\]\]/,$sql;
my $headers;
for(my $i=0;$i<$#split/2;$i++){ #The placeholders are always the odd elements of the array

Loading…
Cancel
Save