[BUGFIX] FileList uses wrong basefolder for isWithinFolder
[Packages/TYPO3.CMS.git] / typo3 / sysext / filelist / Classes / FileList.php
index c6034b9..d81ca05 100644 (file)
@@ -263,12 +263,12 @@ class FileList extends AbstractRecordList {
                                        $addPasteButton = TRUE;
                                        foreach ($elFromTable as $element) {
                                                $clipBoardElement = $this->resourceFactory->retrieveFileOrFolderObject($element);
-                                               if ($clipBoardElement instanceof Folder && $this->folderObject->getStorage()->isWithinFolder($clipBoardElement, $folderObject)) {
+                                               if ($clipBoardElement instanceof Folder && $clipBoardElement->getStorage()->isWithinFolder($clipBoardElement, $folderObject)) {
                                                        $addPasteButton = FALSE;
                                                }
                                        }
                                        if ($addPasteButton) {
-                                               $buttons['PASTE'] = '<a href="' . htmlspecialchars($this->clipObj->pasteUrl('_FILE', $this->folderObject->getCombinedIdentifier())) . '" onclick="return ' . htmlspecialchars($this->clipObj->confirmMsg('_FILE', $this->path, 'into', $elFromTable)) . '" title="' . $this->getLanguageService()->getLL('clip_paste', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-paste-after') . '</a>';
+                                               $buttons['PASTE'] = '<a href="' . htmlspecialchars($this->clipObj->pasteUrl('_FILE', $folderObject->getCombinedIdentifier())) . '" onclick="return ' . htmlspecialchars($this->clipObj->confirmMsg('_FILE', $this->path, 'into', $elFromTable)) . '" title="' . $this->getLanguageService()->getLL('clip_paste', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-paste-after') . '</a>';
                                        }
                                }
                        }
@@ -397,7 +397,7 @@ class FileList extends AbstractRecordList {
                                                $addPasteButton = TRUE;
                                                foreach ($elFromTable as $element) {
                                                        $clipBoardElement = $this->resourceFactory->retrieveFileOrFolderObject($element);
-                                                       if ($clipBoardElement instanceof Folder && $this->folderObject->getStorage()->isWithinFolder($clipBoardElement, $this->folderObject)) {
+                                                       if ($clipBoardElement instanceof Folder && $clipBoardElement->getStorage()->isWithinFolder($clipBoardElement, $this->folderObject)) {
                                                                $addPasteButton = FALSE;
                                                        }
                                                }
@@ -838,7 +838,7 @@ class FileList extends AbstractRecordList {
                        $addPasteButton = TRUE;
                        foreach ($elFromTable as $element) {
                                $clipBoardElement = $this->resourceFactory->retrieveFileOrFolderObject($element);
-                               if ($clipBoardElement instanceof Folder && $fileOrFolderObject->getStorage()->isWithinFolder($clipBoardElement, $fileOrFolderObject)) {
+                               if ($clipBoardElement instanceof Folder && $clipBoardElement->getStorage()->isWithinFolder($clipBoardElement, $fileOrFolderObject)) {
                                        $addPasteButton = FALSE;
                                }
                        }