X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/dba493ac8d5e53b863d59fa25d3b9d2de396b027..e6e07cb0bb7029db6fdfaa43e8756afd397cfe73:/SL/ReportGenerator.pm?ds=sidebyside diff --git a/SL/ReportGenerator.pm b/SL/ReportGenerator.pm index cdcf18fab..732016b94 100644 --- a/SL/ReportGenerator.pm +++ b/SL/ReportGenerator.pm @@ -48,9 +48,11 @@ sub new { $self->{data_present} = 0; + bless $self, $type; + $self->set_options(@_) if (@_); - return bless $self, $type; + return $self; } sub set_columns { @@ -229,7 +231,7 @@ sub get_visible_columns { my $self = shift; my $format = shift; - return grep { my $c = $self->{columns}->{$_}; $c && $c->{visible} && (($c->{visible} == 1) || ($c->{visible} =~ /${format}/i)) } @{ $self->{column_order} }; + return grep { my $c = $self->{columns}->{$_}; $c && $c->{visible} && (($c->{visible} == 1) || ($c->{visible} =~ /\Q${format}\E/i)) } @{ $self->{column_order} }; } sub html_format { @@ -342,7 +344,7 @@ sub generate_html_content { my $self = shift; my $variables = $self->prepare_html_content(); - return $self->{form}->parse_html_template2('report_generator/html_report', $variables); + return $self->{form}->parse_html_template('report_generator/html_report', $variables); } sub verify_paper_size {