From 6a2299245ff92b69cd22325c233eb7dc4fbfcb91 Mon Sep 17 00:00:00 2001
From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Date: Mon, 14 May 2018 09:05:21 +0200
Subject: [PATCH] Bug 20428: (QA follow-up) Remove redundant directory level
Content-Type: text/plain; charset=utf-8
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>
---
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 b3b3dfb..a8eb8a3 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 c4b0233..308737d 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 a09d523..822d808 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.1.4