Lines 33-39
use Digest::MD5 qw(md5_hex);
Link Here
|
33 |
|
33 |
|
34 |
my $input = new CGI; |
34 |
my $input = new CGI; |
35 |
my $file_id = $input->param("id"); |
35 |
my $file_id = $input->param("id"); |
36 |
my $directory = C4::Context->config('publicdir'); |
36 |
my $directory = C4::Context->config('filesaccess'); |
37 |
|
37 |
|
38 |
my ($template, $borrowernumber, $cookie) |
38 |
my ($template, $borrowernumber, $cookie) |
39 |
= get_template_and_user({template_name => "reports/report_files.tt", |
39 |
= get_template_and_user({template_name => "reports/report_files.tt", |
Lines 44-50
my ($template, $borrowernumber, $cookie)
Link Here
|
44 |
}); |
44 |
}); |
45 |
|
45 |
|
46 |
unless($directory) { |
46 |
unless($directory) { |
47 |
$template->param(error_no_publicdir => 1); |
47 |
$template->param(error_no_dir => 1); |
48 |
} |
48 |
} |
49 |
else { |
49 |
else { |
50 |
#Get the files list |
50 |
#Get the files list |
Lines 57-64
else {
Link Here
|
57 |
next if ($filename =~ /^\./ or -d $full_path); |
57 |
next if ($filename =~ /^\./ or -d $full_path); |
58 |
|
58 |
|
59 |
my $st = stat($full_path); |
59 |
my $st = stat($full_path); |
|
|
60 |
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =localtime($st->mtime); |
61 |
my $dt=DateTime->new(year => $year + 1900, |
62 |
month => $mon + 1, |
63 |
day => $mday, |
64 |
hour => $hour, |
65 |
minute => $min, |
66 |
); |
60 |
push(@files_list, {name => $filename, |
67 |
push(@files_list, {name => $filename, |
61 |
date => scalar localtime($st->mtime), |
68 |
date =>Koha::DateUtils::output_pref($dt), |
62 |
size => $st->size, |
69 |
size => $st->size, |
63 |
id => $id}); |
70 |
id => $id}); |
64 |
} |
71 |
} |
65 |
- |
|
|