[BUGFIX] Use file name in delete confirmation message 35/29635/4
authorChristian Weiske <cweiske@cweiske.de>
Thu, 24 Apr 2014 09:48:06 +0000 (11:48 +0200)
committerXavier Perseguers <xavier@typo3.org>
Mon, 12 May 2014 08:33:58 +0000 (10:33 +0200)
Instead of using the file identifier, the actual file name
is used when asking if a file should be deleted.

This is important for non-local FAL storage drivers that
do not use paths as identifiers.

Change-Id: I34e42ed1716f08a4133e02bbc36ee805c6a108c7
Fixes: #58150
Releases: 6.2
Reviewed-on: https://review.typo3.org/29635
Reviewed-by: Frans Saris
Tested-by: Frans Saris
Reviewed-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Reviewed-by: Sebastian Fischer
Reviewed-by: Marcin SÄ…gol
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/filelist/Classes/FileList.php

index 36efc82..cd69dc2 100644 (file)
@@ -872,7 +872,7 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList {
                        }
 
                        if ($GLOBALS['BE_USER']->jsConfirmation(4)) {
-                               $confirmationCheck = 'confirm(' . GeneralUtility::quoteJSvalue(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:mess.delete'), basename($identifier)) . $referenceCountText) . ')';
+                               $confirmationCheck = 'confirm(' . GeneralUtility::quoteJSvalue(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:mess.delete'), $fileOrFolderObject->getName()) . $referenceCountText) . ')';
                        } else {
                                $confirmationCheck = '1 == 1';
                        }