Bug 20428: (QA follow-up) Remove redundant directory level
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 14 May 2018 07:05:21 +0000 (09:05 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 14 May 2018 13:36:39 +0000 (10:36 -0300)
Upload creates its own upload folder in the temp folder, so there is no
need to add another level in temporary_directory.
Removing the creation of this folder in koha-create-dirs too.

Also removing the use Koha::UploadedFiles in about.pl. No longer needed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

Koha/UploadedFile.pm
about.pl
debian/scripts/koha-create-dirs

index b3b3dfb..a8eb8a3 100644 (file)
@@ -168,10 +168,7 @@ Returns root directory for temporary storage
 
 sub temporary_directory {
     my ( $class ) = @_;
-    my $temporary_directory = ( C4::Context->config('tmp_path') )
-            ? C4::Context->config('tmp_path') . '/uploads'
-            : File::Spec->tmpdir;
-    return $temporary_directory;
+    return C4::Context->config('tmp_path') || File::Spec->tmpdir;
 }
 
 =head3 _type
index c4b0233..308737d 100755 (executable)
--- a/about.pl
+++ b/about.pl
@@ -47,7 +47,6 @@ use Koha::Caches;
 use Koha::Config::SysPrefs;
 use Koha::Illrequest::Config;
 use Koha::SearchEngine::Elasticsearch;
-use Koha::UploadedFiles;
 
 use C4::Members::Statistics;
 
index a09d523..822d808 100755 (executable)
@@ -56,7 +56,6 @@ do
     userdir "$name" "/var/lib/koha/$name/plugins"
     userdir "$name" "/var/lib/koha/$name/uploads"
     userdir "$name" "/var/lib/koha/$name/tmp"
-    userdir "$name" "/var/lib/koha/$name/tmp/uploads"
     userdir "$name" "/var/lock/koha/$name"
     userdir "$name" "/var/lock/koha/$name/authorities"
     userdir "$name" "/var/lock/koha/$name/biblios"