[BUGFIX] FileList uses wrong basefolder for isWithinFolder 25/38125/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 08:59:02 +0000 (09:59 +0100)
Resolves: #65983
Releases: master, 6.2
Change-Id: I3565ff6e7bae2266ff40f610fca8dc7a6f5beb1c
Reviewed-on: http://review.typo3.org/38125
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
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;
                                }
                        }