Revision baba1fe9
Von Moritz Bunkus vor fast 17 Jahren hinzugefügt
SL/ReportGenerator.pm | ||
---|---|---|
44 | 44 |
}; |
45 | 45 |
$self->{export} = { |
46 | 46 |
'nextsub' => '', |
47 |
'variable_list' => '',
|
|
47 |
'variable_list' => [],
|
|
48 | 48 |
}; |
49 | 49 |
|
50 | 50 |
$self->{data_present} = 0; |
... | ... | |
209 | 209 |
|
210 | 210 |
$self->{export} = { |
211 | 211 |
'nextsub' => shift, |
212 |
'variable_list' => join(" ", @_),
|
|
212 |
'variable_list' => [ @_ ],
|
|
213 | 213 |
}; |
214 | 214 |
} |
215 | 215 |
|
... | ... | |
362 | 362 |
} |
363 | 363 |
} |
364 | 364 |
|
365 |
my @export_variables; |
|
366 |
foreach my $key (split m/ +/, $self->{export}->{variable_list}) { |
|
367 |
push @export_variables, { 'key' => $key, 'value' => $self->{form}->{$key} }; |
|
368 |
} |
|
365 |
my @export_variables = $self->{form}->flatten_variables(@{ $self->{export}->{variable_list} }); |
|
369 | 366 |
|
370 | 367 |
my $allow_pdf_export = $opts->{allow_pdf_export} && (-x $main::html2ps_bin) && (-x $main::ghostscript_bin); |
371 | 368 |
|
... | ... | |
382 | 379 |
'NUM_COLUMNS' => scalar @column_headers, |
383 | 380 |
'ROWS' => \@rows, |
384 | 381 |
'EXPORT_VARIABLES' => \@export_variables, |
385 |
'EXPORT_VARIABLE_LIST' => $self->{export}->{variable_list},
|
|
382 |
'EXPORT_VARIABLE_LIST' => join(' ', @{ $self->{export}->{variable_list} }),
|
|
386 | 383 |
'EXPORT_NEXTSUB' => $self->{export}->{nextsub}, |
387 | 384 |
'DATA_PRESENT' => $self->{data_present}, |
388 | 385 |
}; |
Auch abrufbar als: Unified diff
Unterstützung für strukturierte Variablennamen und Hash- und Arraystrukturen in $form in den mitzuschleifenden Variablen.