Bug 25109: (QA follow-up) Add a test for lockdir writable in about.pl
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 13 Apr 2020 18:45:50 +0000 (15:45 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 14 Apr 2020 15:57:15 +0000 (16:57 +0100)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

about.pl
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt

index 85e55cb..dc25550 100755 (executable)
--- 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 ) {
index 341a618..d8f0dfa 100644 (file)
                         add it, pointing to your Koha instance's lock dir.
                     </td>
                 </tr>
+                [% ELSIF config_entry.error == 'lockdir_not_writable' %]
+                <tr>
+                    <th scope="row"><b>Warning</b></th>
+                    <td>The configured &lt;lockdir&gt; entry in your koha-conf.xml file points to a
+                        non-writable directory ([% config_entry.lockdir | html %]).
+                    </td>
+                </tr>
                 [% ELSIF config_entry.error == 'uploadpath_entry_missing' %]
                 <tr>
                     <th scope="row"><b>Warning</b></th>