|
Lines 25-30
use Modern::Perl;
Link Here
|
| 25 |
use CGI qw ( -utf8 ); |
25 |
use CGI qw ( -utf8 ); |
| 26 |
use DateTime::TimeZone; |
26 |
use DateTime::TimeZone; |
| 27 |
use File::Spec; |
27 |
use File::Spec; |
|
|
28 |
use File::Slurp; |
| 28 |
use List::MoreUtils qw/ any /; |
29 |
use List::MoreUtils qw/ any /; |
| 29 |
use LWP::Simple; |
30 |
use LWP::Simple; |
| 30 |
use Module::Load::Conditional qw(can_load); |
31 |
use Module::Load::Conditional qw(can_load); |
|
Lines 48-53
use Koha::Caches;
Link Here
|
| 48 |
use Koha::Config::SysPrefs; |
49 |
use Koha::Config::SysPrefs; |
| 49 |
use Koha::Illrequest::Config; |
50 |
use Koha::Illrequest::Config; |
| 50 |
use Koha::SearchEngine::Elasticsearch; |
51 |
use Koha::SearchEngine::Elasticsearch; |
|
|
52 |
use Koha::Logger; |
| 51 |
|
53 |
|
| 52 |
use C4::Members::Statistics; |
54 |
use C4::Members::Statistics; |
| 53 |
|
55 |
|
|
Lines 93-98
my $time_zone = {
Link Here
|
| 93 |
environment_invalid => $env_invalid |
95 |
environment_invalid => $env_invalid |
| 94 |
}; |
96 |
}; |
| 95 |
|
97 |
|
|
|
98 |
{ # Logger checks |
| 99 |
my $log4perl_config = C4::Context->config("log4perl_conf"); |
| 100 |
my @log4perl_errors; |
| 101 |
if ( ! $log4perl_config ) { |
| 102 |
push @log4perl_errors, 'missing_config_entry' |
| 103 |
} |
| 104 |
else { |
| 105 |
my @lines = read_file($log4perl_config) or push @log4perl_errors, 'cannot_read_config_file'; |
| 106 |
for my $line ( @lines ) { |
| 107 |
next unless $line =~ m|log4perl.appender.\w+.filename=(.*)|; |
| 108 |
push @log4perl_errors, 'logfile_not_writable' unless -w $1; |
| 109 |
} |
| 110 |
} |
| 111 |
eval {Koha::Logger->get}; |
| 112 |
push @log4perl_errors, 'cannot_init_module' and warn $@ if $@; |
| 113 |
$template->param( log4perl_errors => @log4perl_errors ); |
| 114 |
} |
| 115 |
|
| 96 |
$template->param( |
116 |
$template->param( |
| 97 |
time_zone => $time_zone, |
117 |
time_zone => $time_zone, |
| 98 |
current_date_and_time => output_pref({ dt => dt_from_string(), dateformat => 'iso' }) |
118 |
current_date_and_time => output_pref({ dt => dt_from_string(), dateformat => 'iso' }) |