[BUGFIX] FileList uses wrong basefolder for isWithinFolder 28/38128/3
authorFrans Saris <franssaris@gmail.com>
Tue, 24 Mar 2015 18:02:13 +0000 (19:02 +0100)
committerNicole Cordes <typo3@cordes.co>
Wed, 25 Mar 2015 09:07:39 +0000 (10:07 +0100)
Resolves: #65983
Releases: master, 6.2
Change-Id: I3565ff6e7bae2266ff40f610fca8dc7a6f5beb1c
Reviewed-on: http://review.typo3.org/38128
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/filelist/Classes/FileList.php

index 4ffcbc0..a9f6ac7 100644 (file)
@@ -252,12 +252,12 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\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="' . $GLOBALS['LANG']->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="' . $GLOBALS['LANG']->getLL('clip_paste', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-paste-after') . '</a>';
                                        }
                                }
                        }
@@ -377,7 +377,7 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\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 \TYPO3\CMS\Backend\RecordList\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;
                                }
                        }