Skip to content
Snippets Groups Projects
Commit e628f2e8 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Tmp folders for file uploads dont use fe user id anymore as a part of the name

parent 37e8a271
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,7 @@ class JoblistController extends ActionController { ...@@ -103,7 +103,7 @@ class JoblistController extends ActionController {
*/ */
public function applyAction(JobApplication $applyData) { public function applyAction(JobApplication $applyData) {
try { try {
$this->submitApplicationFiles($GLOBALS['TSFE']->fe_user->id, $applyData); $this->submitApplicationFiles($applyData);
/** @noinspection PhpMethodParametersCountMismatchInspection */ /** @noinspection PhpMethodParametersCountMismatchInspection */
$mailService = $this->objectManager->get( $mailService = $this->objectManager->get(
...@@ -253,13 +253,13 @@ class JoblistController extends ActionController { ...@@ -253,13 +253,13 @@ class JoblistController extends ActionController {
* @throws \Exception * @throws \Exception
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*/ */
private function submitApplicationFiles($folder, JobApplication $applicationData) { private function submitApplicationFiles(JobApplication $applicationData) {
$objectManager = GeneralUtility::makeInstance(ObjectManager::class); $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$resourceFactory = $objectManager->get(ResourceFactory::class); $resourceFactory = $objectManager->get(ResourceFactory::class);
$storage = $resourceFactory->getStorageObject(1); $storage = $resourceFactory->getStorageObject(1);
$newName = date('Ymd-His') . '_' . $applicationData->getFirstName(); $newName = date('Ymd-His') . '_' . $applicationData->getFirstName();
$sourceFolder = $storage->getFolder('/Extension/temp/' . $folder); $sourceFolder = $storage->getFolder('/Extension/temp/' . uniqid('sgjobs-', TRUE));
$subFolders = $storage->getFoldersInFolder($sourceFolder); $subFolders = $storage->getFoldersInFolder($sourceFolder);
$fileNames = []; $fileNames = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment