[BUGFIX] Show form definitions with same filename from different storages 91/61891/6
authorChristian Eßl <indy.essl@gmail.com>
Sat, 5 Oct 2019 09:02:12 +0000 (11:02 +0200)
committerRalf Zimmermann <ralf.zimmermann@tritum.de>
Fri, 22 Nov 2019 19:19:58 +0000 (20:19 +0100)
If multiple storages for form definitions exist and two or more storages
have form definitions with the same filename, the latter form definition
would not be shown in the list of the form manager.

The patch fixes this problem.

Resolves: #88539
Releases: master, 9.5
Change-Id: Ifd39a0ba079e7f6bc9a1f800fc63696f4085dbc7
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61891
Tested-by: Susanne Moog <look@susi.dev>
Tested-by: Björn Jacob <bjoern.jacob@tritum.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Reviewed-by: Susanne Moog <look@susi.dev>
Reviewed-by: Björn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
typo3/sysext/form/Classes/Mvc/Persistence/FormPersistenceManager.php
typo3/sysext/form/Resources/Public/JavaScript/Backend/FormManager.js

index d9003ab..6cf3e30 100644 (file)
@@ -361,7 +361,7 @@ class FormPersistenceManager implements FormPersistenceManagerInterface
                 Folder::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS,
                 true
             );
-            $filesFromStorageFolders = $filesFromStorageFolders + $files;
+            $filesFromStorageFolders = array_merge($filesFromStorageFolders, array_values($files));
             $storage->resetFileAndFolderNameFiltersToDefault();
         }
 
index eb0a8c3..b07e405 100644 (file)
@@ -136,7 +136,7 @@ define(['jquery'], function($) {
         if ('array' === $.type(_configuration['accessibleFormStorageFolders'])) {
           for (var i = 0, len1 = _configuration['accessibleFormStorageFolders'].length; i < len1; ++i) {
             folders.push({
-              label: _configuration['accessibleFormStorageFolders'][i]['label'],
+              label: _configuration['accessibleFormStorageFolders'][i]['label'] + ' (' + _configuration['accessibleFormStorageFolders'][i]['value'] + ')',
               value: _configuration['accessibleFormStorageFolders'][i]['value']
             });
           }