Revision 2787b39a
Von Moritz Bunkus vor fast 19 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
421 | 421 |
$main::lxdebug->leave_sub(); |
422 | 422 |
} |
423 | 423 |
|
424 |
use Data::Dumper; |
|
424 | 425 |
sub parse_html_template { |
425 | 426 |
$main::lxdebug->enter_sub(); |
426 | 427 |
|
427 |
my ($self, $myconfig, $file, $additional_params) = @_;
|
|
428 |
my ($self, $file, $additional_params) = @_; |
|
428 | 429 |
|
429 |
if (-f "templates/webpages/${file}_" . $myconfig->{"countrycode"} .
|
|
430 |
if (-f "templates/webpages/${file}_" . $main::myconfig{"countrycode"} .
|
|
430 | 431 |
".html") { |
431 |
$file = "templates/webpages/${file}_" . $myconfig->{"countrycode"} .
|
|
432 |
$file = "templates/webpages/${file}_" . $main::myconfig{"countrycode"} .
|
|
432 | 433 |
".html"; |
433 | 434 |
} elsif (-f "templates/webpages/${file}.html") { |
434 | 435 |
$file = "templates/webpages/${file}.html"; |
... | ... | |
471 | 472 |
} |
472 | 473 |
|
473 | 474 |
sub show_generic_error { |
474 |
my ($self, $myconfig, $error, $title) = @_;
|
|
475 |
my ($self, $error, $title) = @_; |
|
475 | 476 |
|
476 | 477 |
my $add_params = {}; |
477 | 478 |
$add_params->{"title"} = $title if ($title); |
478 | 479 |
$self->{"label_error"} = $error; |
479 | 480 |
|
480 |
print($self->parse_html_template($myconfig, "generic/error", $add_params));
|
|
481 |
print($self->parse_html_template("generic/error", $add_params)); |
|
481 | 482 |
} |
482 | 483 |
|
483 | 484 |
# write Trigger JavaScript-Code ($qty = quantity of Triggers) |
Auch abrufbar als: Unified diff
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]