Bug 20428: Display warning if the entry is empty
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 14 May 2018 14:11:34 +0000 (11:11 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 14 May 2018 14:14:40 +0000 (11:14 -0300)
And not only if the entry is missing. We should do the same for other
entries.
Also, use Koha::UploadedFile->temporary_directory to know the fallback
value.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

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

index 308737d..70900dd 100755 (executable)
--- a/about.pl
+++ b/about.pl
@@ -47,6 +47,7 @@ use Koha::Caches;
 use Koha::Config::SysPrefs;
 use Koha::Illrequest::Config;
 use Koha::SearchEngine::Elasticsearch;
+use Koha::UploadedFiles;
 
 use C4::Members::Statistics;
 
@@ -261,10 +262,11 @@ if ( ! defined C4::Context->config('upload_path') ) {
     }
 }
 
-if ( ! defined C4::Context->config('tmp_path') ) {
+if ( ! C4::Context->config('tmp_path') ) {
+    my $temporary_directory = Koha::UploadedFile->temporary_directory;
     push @xml_config_warnings, {
-        error             => 'tmp_path_entry_missing',
-        effective_tmp_dir => File::Spec->tmpdir
+        error             => 'tmp_path_missing',
+        effective_tmp_dir => $temporary_directory,
     }
 }
 
index a3e7bf7..6c67f27 100644 (file)
                         Also note that you need to properly set the OPACBaseURL preference for the file upload plugin to work.
                     </td>
                 </tr>
-                [% ELSIF config_entry.error == 'tmp_path_entry_missing' %]
+                [% ELSIF config_entry.error == 'tmp_path_missing' %]
                 <tr>
                     <th scope="row"><b>Warning</b></th>
                     <td>You are missing the &lt;tmp_path&gt; entry in your koha-conf.xml file. Please