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 |
}; |
bin/mozilla/reportgenerator.pl | ||
---|---|---|
34 | 34 |
return; |
35 | 35 |
} |
36 | 36 |
|
37 |
my @form_values; |
|
38 |
map { push @form_values, { 'key' => $_, 'value' => $form->{$_} } } keys %{ $form }; |
|
37 |
my @form_values = $form->flatten_variables(keys %{ $form }); |
|
39 | 38 |
|
40 | 39 |
$form->get_lists('printers' => 'ALL_PRINTERS'); |
41 | 40 |
map { $_->{selected} = $myconfig{default_printer_id} == $_->{id} } @{ $form->{ALL_PRINTERS} }; |
... | ... | |
58 | 57 |
return; |
59 | 58 |
} |
60 | 59 |
|
61 |
my @form_values; |
|
62 |
map { push @form_values, { 'key' => $_, 'value' => $form->{$_} } } keys %{ $form }; |
|
60 |
my @form_values = $form->flatten_variables(keys %{ $form }); |
|
63 | 61 |
|
64 | 62 |
$form->{title} = $locale->text('CSV export -- options'); |
65 | 63 |
$form->header(); |
Auch abrufbar als: Unified diff
Unterstützung für strukturierte Variablennamen und Hash- und Arraystrukturen in $form in den mitzuschleifenden Variablen.