[BUGFIX] Remove driver id from file move message
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / ClickMenu / ClickMenu.php
index bbca171..db7af65 100644 (file)
@@ -942,13 +942,14 @@ class ClickMenu {
                        if (!in_array('paste', $this->disabledItems) && $elFromAllTables && $folder && $fileObject->checkActionPermission('write')) {
                                $elArr = $this->clipObj->elFromTable('_FILE');
                                $selItem = reset($elArr);
+                               $clickedFileOrFolder = ResourceFactory::getInstance()->retrieveFileOrFolderObject($combinedIdentifier);
+                               $fileOrFolderInClipBoard = ResourceFactory::getInstance()->retrieveFileOrFolderObject($selItem);
+                               $fileInfo = $fileOrFolderInClipBoard->getStorage()->getFileInfoByIdentifier(substr(strstr($selItem, ':'), 1));
                                $elInfo = array(
-                                       basename($selItem),
-                                       basename($identifier),
+                                       $fileInfo['name'],
+                                       $clickedFileOrFolder->getName(),
                                        $this->clipObj->currentMode()
                                );
-                               $clickedFileOrFolder = ResourceFactory::getInstance()->retrieveFileOrFolderObject($combinedIdentifier);
-                               $fileOrFolderInClipBoard = ResourceFactory::getInstance()->retrieveFileOrFolderObject($selItem);
                                if (!$fileOrFolderInClipBoard instanceof Folder || !$fileOrFolderInClipBoard->getStorage()->isWithinFolder($fileOrFolderInClipBoard, $clickedFileOrFolder)) {
                                        $menuItems['pasteinto'] = $this->FILE_paste($identifier, $selItem, $elInfo);
                                }