@@ -, +, @@
...
/tmp/files-access
...
---
.../prog/en/modules/reports/report_files.tt | 4 ++--
.../prog/en/modules/reports/reports-home.tt | 1 -
.../prog/en/modules/tools/tools-home.tt | 3 +++
reports/report_files.pl | 13 ++++++++++---
4 files changed, 15 insertions(+), 6 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/report_files.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/report_files.tt
@@ -31,8 +31,8 @@
Report/log files
-[% IF ( error_no_publicdir ) %]
- Error : Report/log files could not be found because the "publicdir" option was not set in "koha-conf.xml". Contact your system administrator to add this option.
+[% IF ( error_no_dir ) %]
+ Error : Report/log files could not be found because the "filesaccess" option was not set in "koha-conf.xml". Contact your system administrator to add this option.
[% ELSE %]
[% IF ( files_loop ) %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt
@@ -66,7 +66,6 @@
Koha database schema
Koha reports library
- Report/log files
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt
@@ -111,6 +111,9 @@
Use tool plugins
[% END %]
+ Report/log files
+ Report/log files
+
--- a/reports/report_files.pl
+++ a/reports/report_files.pl
@@ -33,7 +33,7 @@ use Digest::MD5 qw(md5_hex);
my $input = new CGI;
my $file_id = $input->param("id");
-my $directory = C4::Context->config('publicdir');
+my $directory = C4::Context->config('filesaccess');
my ($template, $borrowernumber, $cookie)
= get_template_and_user({template_name => "reports/report_files.tt",
@@ -44,7 +44,7 @@ my ($template, $borrowernumber, $cookie)
});
unless($directory) {
- $template->param(error_no_publicdir => 1);
+ $template->param(error_no_dir => 1);
}
else {
#Get the files list
@@ -57,8 +57,15 @@ else {
next if ($filename =~ /^\./ or -d $full_path);
my $st = stat($full_path);
+ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =localtime($st->mtime);
+ my $dt=DateTime->new(year => $year + 1900,
+ month => $mon + 1,
+ day => $mday,
+ hour => $hour,
+ minute => $min,
+ );
push(@files_list, {name => $filename,
- date => scalar localtime($st->mtime),
+ date =>Koha::DateUtils::output_pref($dt),
size => $st->size,
id => $id});
}
--