From 2787b39add04ea83761a147d917f7e14400145bf Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 15 Feb 2006 09:44:54 +0000 Subject: [PATCH] Greife direkt auf %myconfig aus dem "main"-Namensraum zu, da das Objekt immer existiert, wenn parse_html_template aufgerufen wird. Ausserdem gibt es immer nur dieses eine. [r775 aus LINET prog-Repo] --- SL/Form.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/SL/Form.pm b/SL/Form.pm index 95034e57b..241cf0bf5 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -421,14 +421,15 @@ function fokus(){document.$self->{fokus}.focus();} $main::lxdebug->leave_sub(); } +use Data::Dumper; sub parse_html_template { $main::lxdebug->enter_sub(); - my ($self, $myconfig, $file, $additional_params) = @_; + my ($self, $file, $additional_params) = @_; - if (-f "templates/webpages/${file}_" . $myconfig->{"countrycode"} . + if (-f "templates/webpages/${file}_" . $main::myconfig{"countrycode"} . ".html") { - $file = "templates/webpages/${file}_" . $myconfig->{"countrycode"} . + $file = "templates/webpages/${file}_" . $main::myconfig{"countrycode"} . ".html"; } elsif (-f "templates/webpages/${file}.html") { $file = "templates/webpages/${file}.html"; @@ -471,13 +472,13 @@ sub parse_html_template { } sub show_generic_error { - my ($self, $myconfig, $error, $title) = @_; + my ($self, $error, $title) = @_; my $add_params = {}; $add_params->{"title"} = $title if ($title); $self->{"label_error"} = $error; - print($self->parse_html_template($myconfig, "generic/error", $add_params)); + print($self->parse_html_template("generic/error", $add_params)); } # write Trigger JavaScript-Code ($qty = quantity of Triggers) -- 2.20.1