From e628f2e885dd0281052478d8b8765e5ecd0fe124 Mon Sep 17 00:00:00 2001 From: Torsten Oppermann <torsten@sgalinski.de> Date: Mon, 11 Dec 2017 17:53:24 +0100 Subject: [PATCH] [TASK] Tmp folders for file uploads dont use fe user id anymore as a part of the name --- Classes/Controller/JoblistController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Controller/JoblistController.php b/Classes/Controller/JoblistController.php index 981a4417..6ce6bb2e 100644 --- a/Classes/Controller/JoblistController.php +++ b/Classes/Controller/JoblistController.php @@ -103,7 +103,7 @@ class JoblistController extends ActionController { */ public function applyAction(JobApplication $applyData) { try { - $this->submitApplicationFiles($GLOBALS['TSFE']->fe_user->id, $applyData); + $this->submitApplicationFiles($applyData); /** @noinspection PhpMethodParametersCountMismatchInspection */ $mailService = $this->objectManager->get( @@ -253,13 +253,13 @@ class JoblistController extends ActionController { * @throws \Exception * @throws \InvalidArgumentException */ - private function submitApplicationFiles($folder, JobApplication $applicationData) { + private function submitApplicationFiles(JobApplication $applicationData) { $objectManager = GeneralUtility::makeInstance(ObjectManager::class); $resourceFactory = $objectManager->get(ResourceFactory::class); $storage = $resourceFactory->getStorageObject(1); $newName = date('Ymd-His') . '_' . $applicationData->getFirstName(); - $sourceFolder = $storage->getFolder('/Extension/temp/' . $folder); + $sourceFolder = $storage->getFolder('/Extension/temp/' . uniqid('sgjobs-', TRUE)); $subFolders = $storage->getFoldersInFolder($sourceFolder); $fileNames = []; -- GitLab