projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tabellenzeilen richtig einfaerben.
[kivitendo-erp.git]
/
SL
/
Form.pm
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
3354a2f
..
3b683f4
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-2300,10
+2300,14
@@
sub new {
my ($type, $country, $NLS_file) = @_;
my $self = {};
my ($type, $country, $NLS_file) = @_;
my $self = {};
- %self = ();
if ($country && -d "locale/$country") {
if ($country && -d "locale/$country") {
+ local *IN;
$self->{countrycode} = $country;
$self->{countrycode} = $country;
- eval { require "locale/$country/$NLS_file"; };
+ if (open(IN, "locale/$country/$NLS_file")) {
+ my $code = join("", <IN>);
+ eval($code);
+ close(IN);
+ }
}
$self->{NLS_file} = $NLS_file;
}
$self->{NLS_file} = $NLS_file;
@@
-2323,7
+2327,7
@@
sub new {
sub text {
my ($self, $text) = @_;
sub text {
my ($self, $text) = @_;
- return (exists $self
{texts}{$text}) ? $self
{texts}{$text} : $text;
+ return (exists $self
->{texts}{$text}) ? $self->
{texts}{$text} : $text;
}
sub findsub {
}
sub findsub {
@@
-2331,8
+2335,8
@@
sub findsub {
my ($self, $text) = @_;
my ($self, $text) = @_;
- if (exists $self{subs}{$text}) {
- $text = $self{subs}{$text};
+ if (exists $self
->
{subs}{$text}) {
+ $text = $self
->
{subs}{$text};
} else {
if ($self->{countrycode} && $self->{NLS_file}) {
Form->error(
} else {
if ($self->{countrycode} && $self->{NLS_file}) {
Form->error(