From a88e052ae5e420eb2f8ffa7555756b0581b72652 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 14 May 2018 09:05:21 +0200 Subject: [PATCH] Bug 20428: (QA follow-up) Remove redundant directory level 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 Signed-off-by: Jonathan Druart --- Koha/UploadedFile.pm | 5 +---- about.pl | 1 - debian/scripts/koha-create-dirs | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Koha/UploadedFile.pm b/Koha/UploadedFile.pm index b3b3dfbfa0..a8eb8a3df3 100644 --- a/Koha/UploadedFile.pm +++ b/Koha/UploadedFile.pm @@ -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 diff --git a/about.pl b/about.pl index c4b0233d60..308737debd 100755 --- 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; diff --git a/debian/scripts/koha-create-dirs b/debian/scripts/koha-create-dirs index a09d523c83..822d808db4 100755 --- a/debian/scripts/koha-create-dirs +++ b/debian/scripts/koha-create-dirs @@ -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" -- 2.20.1