X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=68b168127d46934d3fc46f4fe35744638f140fa4;hb=9c228f168c91f538bd70278a481462618a782e0b;hp=e44f3977d6f3f8d33b7497f12b582591114a1442;hpb=7274f9c8e8c61b00ff7a4e2bad6accec85015a73;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index e44f3977d..68b168127 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -251,6 +251,7 @@ sub new { my $self = {}; + no warnings 'once'; if ($LXDebug::watch_form) { require SL::Watchdog; tie %{ $self }, 'SL::Watchdog'; @@ -845,8 +846,8 @@ sub _prepare_html_template { $additional_params->{"conf_payments_changeable"} = $::lx_office_conf{features}->{payments_changeable}; $additional_params->{"INSTANCE_CONF"} = $::instance_conf; - if (%main::debug_options) { - map { $additional_params->{'DEBUG_' . uc($_)} = $main::debug_options{$_} } keys %main::debug_options; + if (my $debug_options = $::lx_office_conf{debug}{options}) { + map { $additional_params->{'DEBUG_' . uc($_)} = $debug_options->{$_} } keys %$debug_options; } if ($main::auth && $main::auth->{RIGHTS} && $main::auth->{RIGHTS}->{$self->{login}}) { @@ -1117,8 +1118,7 @@ sub format_amount_units { return ''; } - AM->retrieve_all_units(); - my $all_units = $main::all_units; + my $all_units = AM->retrieve_all_units; if (('' eq ref $conv_units) && ($conv_units =~ /convertible/)) { $conv_units = AM->convertible_units($all_units, $part_unit_name, $conv_units eq 'convertible_not_smaller'); @@ -1410,6 +1410,7 @@ sub parse_template { if ($self->{OUT}) { open OUT, '>', $self->{OUT} or $self->error($self->cleanup . "$self->{OUT} : $!"); print OUT while ; + close OUT; seek IN, 0, 0; } else { @@ -1424,10 +1425,8 @@ Content-Length: $numbytes |; - open(OUT, ">&", \*STDOUT) or $self->error($self->cleanup . "$!: STDOUT"); - $::locale->with_raw_io(*OUT, sub { print while }); + $::locale->with_raw_io(\*STDOUT, sub { print while }); } - close OUT; } close(IN);