Lines 36-47
BEGIN {
Link Here
|
36 |
}; |
36 |
}; |
37 |
|
37 |
|
38 |
use Carp qw( carp ); |
38 |
use Carp qw( carp ); |
39 |
use DateTime::TimeZone; |
|
|
40 |
use Encode; |
39 |
use Encode; |
41 |
use File::Spec; |
40 |
use File::Spec; |
42 |
use POSIX; |
|
|
43 |
use YAML::XS; |
44 |
use ZOOM; |
45 |
use List::MoreUtils qw(any); |
41 |
use List::MoreUtils qw(any); |
46 |
|
42 |
|
47 |
use Koha::Caches; |
43 |
use Koha::Caches; |
Lines 342-347
the value cannot be properly decoded as YAML.
Link Here
|
342 |
sub yaml_preference { |
338 |
sub yaml_preference { |
343 |
my ( $self, $preference ) = @_; |
339 |
my ( $self, $preference ) = @_; |
344 |
|
340 |
|
|
|
341 |
require YAML::XS; |
345 |
my $yaml = eval { YAML::XS::Load( Encode::encode_utf8( $self->preference( $preference ) ) ); }; |
342 |
my $yaml = eval { YAML::XS::Load( Encode::encode_utf8( $self->preference( $preference ) ) ); }; |
346 |
if ($@) { |
343 |
if ($@) { |
347 |
warn "Unable to parse $preference syspref : $@"; |
344 |
warn "Unable to parse $preference syspref : $@"; |
Lines 607-612
sub _new_Zconn {
Link Here
|
607 |
my $user = $serverinfo->{user}; |
604 |
my $user = $serverinfo->{user}; |
608 |
my $password = $serverinfo->{password}; |
605 |
my $password = $serverinfo->{password}; |
609 |
eval { |
606 |
eval { |
|
|
607 |
require ZOOM; |
610 |
# set options |
608 |
# set options |
611 |
my $o = ZOOM::Options->new(); |
609 |
my $o = ZOOM::Options->new(); |
612 |
$o->option(user => $user) if $user && $password; |
610 |
$o->option(user => $user) if $user && $password; |
Lines 873-878
sub get_versions {
Link Here
|
873 |
my ( %versions, $mysqlVersion ); |
871 |
my ( %versions, $mysqlVersion ); |
874 |
$versions{kohaVersion} = Koha::version(); |
872 |
$versions{kohaVersion} = Koha::version(); |
875 |
$versions{kohaDbVersion} = C4::Context->preference('version'); |
873 |
$versions{kohaDbVersion} = C4::Context->preference('version'); |
|
|
874 |
require POSIX; |
876 |
$versions{osVersion} = join(" ", POSIX::uname()); |
875 |
$versions{osVersion} = join(" ", POSIX::uname()); |
877 |
$versions{perlVersion} = $]; |
876 |
$versions{perlVersion} = $]; |
878 |
|
877 |
|
Lines 904-909
sub tz {
Link Here
|
904 |
my $self = shift; |
903 |
my $self = shift; |
905 |
if (!defined $context->{tz}) { |
904 |
if (!defined $context->{tz}) { |
906 |
my $timezone = $context->{config}->timezone; |
905 |
my $timezone = $context->{config}->timezone; |
|
|
906 |
require DateTime::TimeZone; |
907 |
$context->{tz} = DateTime::TimeZone->new(name => $timezone); |
907 |
$context->{tz} = DateTime::TimeZone->new(name => $timezone); |
908 |
} |
908 |
} |
909 |
return $context->{tz}; |
909 |
return $context->{tz}; |