From badbebfb345b3c5e3528e95abe45849a7f685511 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 13 Apr 2020 15:45:50 -0300 Subject: [PATCH] Bug 25109: (QA follow-up) Add a test for lockdir writable in about.pl Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart --- about.pl | 8 ++++++++ koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/about.pl b/about.pl index 85e55cb0c0..dc25550fd2 100755 --- a/about.pl +++ b/about.pl @@ -214,6 +214,14 @@ if ( ! defined C4::Context->config('lockdir') ) { error => 'lockdir_entry_missing' } } +else { + unless ( -w C4::Context->config('lockdir') ) { + push @xml_config_warnings, { + error => 'lockdir_not_writable', + lockdir => C4::Context->config('lockdir') + } + } +} if ( ! defined C4::Context->config('upload_path') ) { if ( Koha::Config::SysPrefs->find('OPACBaseURL')->value ) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 341a618232..d8f0dfa01b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -366,6 +366,13 @@ add it, pointing to your Koha instance's lock dir. + [% ELSIF config_entry.error == 'lockdir_not_writable' %] + + Warning + The configured <lockdir> entry in your koha-conf.xml file points to a + non-writable directory ([% config_entry.lockdir | html %]). + + [% ELSIF config_entry.error == 'uploadpath_entry_missing' %] Warning -- 2.20.1