projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Dokumentation
[kivitendo-erp.git]
/
SL
/
Locale.pm
diff --git
a/SL/Locale.pm
b/SL/Locale.pm
index
c45a1a1
..
dce9e64
100644
(file)
--- a/
SL/Locale.pm
+++ b/
SL/Locale.pm
@@
-55,7
+55,7
@@
sub new {
my ($type, $country) = @_;
my ($type, $country) = @_;
- $country ||= $::l
anguage
;
+ $country ||= $::l
x_office_conf{system}->{language}
;
$country =~ s|.*/||;
$country =~ s|\.||g;
$country =~ s|.*/||;
$country =~ s|\.||g;
@@
-96,8
+96,8
@@
sub _init {
}
}
}
}
- my $db_charset = $
main::dbcharset
|| Common::DEFAULT_CHARSET;
- $self->{is_utf8} = (any { lc($::
dbcharset
|| '') eq $_ } qw(utf8 utf-8 unicode)) ? 1 : 0;
+ my $db_charset = $
::lx_office_conf{system}->{dbcharset}
|| Common::DEFAULT_CHARSET;
+ $self->{is_utf8} = (any { lc($::
lx_office_conf{system}->{dbcharset}
|| '') eq $_ } qw(utf8 utf-8 unicode)) ? 1 : 0;
if ($self->{is_utf8}) {
binmode STDOUT, ":utf8";
if ($self->{is_utf8}) {
binmode STDOUT, ":utf8";
@@
-340,13
+340,13
@@
sub date {
}
sub parse_date {
}
sub parse_date {
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(
2
);
my ($self, $myconfig, $date, $longformat) = @_;
my ($spc, $yy, $mm, $dd);
unless ($date) {
my ($self, $myconfig, $date, $longformat) = @_;
my ($spc, $yy, $mm, $dd);
unless ($date) {
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(
2
);
return ();
}
return ();
}
@@
-373,7
+373,7
@@
sub parse_date {
$yy = ($yy < 70) ? $yy + 2000 : $yy;
$yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy;
$yy = ($yy < 70) ? $yy + 2000 : $yy;
$yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy;
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(
2
);
return ($yy, $mm, $dd);
}
return ($yy, $mm, $dd);
}
@@
-385,11
+385,11
@@
sub parse_date_to_object {
}
sub reformat_date {
}
sub reformat_date {
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(
2
);
my ($self, $myconfig, $date, $output_format, $longformat) = @_;
my ($self, $myconfig, $date, $output_format, $longformat) = @_;
- $main::lxdebug->leave_sub() and return "" unless ($date);
+ $main::lxdebug->leave_sub(
2
) and return "" unless ($date);
my ($yy, $mm, $dd) = $self->parse_date($myconfig, $date);
my ($yy, $mm, $dd) = $self->parse_date($myconfig, $date);
@@
-404,7
+404,7
@@
sub reformat_date {
$output_format =~ /y+/;
substr($output_format, $-[0], $+[0] - $-[0]) = $yy;
$output_format =~ /y+/;
substr($output_format, $-[0], $+[0] - $-[0]) = $yy;
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(
2
);
return $output_format;
}
return $output_format;
}