diff --git a/typo3/sysext/backend/Classes/Controller/FileSystemNavigationFrameController.php b/typo3/sysext/backend/Classes/Controller/FileSystemNavigationFrameController.php index 905dad7781d4a42fa1fbb594a70e1b104fa48409..7a476436ca9bbe8aab70c60fdbcd4d3f2084d1bb 100644 --- a/typo3/sysext/backend/Classes/Controller/FileSystemNavigationFrameController.php +++ b/typo3/sysext/backend/Classes/Controller/FileSystemNavigationFrameController.php @@ -109,7 +109,6 @@ class FileSystemNavigationFrameController if (!empty($this->scopeData)) { $this->foldertree = GeneralUtility::makeInstance($this->scopeData['class']); $this->foldertree->thisScript = $this->scopeData['script']; - $this->foldertree->ext_noTempRecyclerDirs = $this->scopeData['ext_noTempRecyclerDirs']; if ($this->foldertree instanceof ElementBrowserFolderTreeView) { // create a fake provider to pass link data along properly $linkParamProvider = GeneralUtility::makeInstance( diff --git a/typo3/sysext/backend/Classes/Tree/View/ElementBrowserFolderTreeView.php b/typo3/sysext/backend/Classes/Tree/View/ElementBrowserFolderTreeView.php index 3912258caf1c5b74ed8278be4c1069e4c30839e2..74fc5e086fc7ad5064f0ea66da73a2ceba27e030 100644 --- a/typo3/sysext/backend/Classes/Tree/View/ElementBrowserFolderTreeView.php +++ b/typo3/sysext/backend/Classes/Tree/View/ElementBrowserFolderTreeView.php @@ -62,7 +62,7 @@ class ElementBrowserFolderTreeView extends FolderTreeView $theFolderIcon = ''; // Wrap icon in link (in ElementBrowser only the "titlelink" is used). - if ($this->ext_IconMode === 'titlelink' && $this->ext_isLinkable($folderObject)) { + if ($this->ext_IconMode === 'titlelink') { $parameters = GeneralUtility::implodeArrayForUrl('', $this->linkParameterProvider->getUrlParameters(['identifier' => $folderObject->getCombinedIdentifier()])); $aOnClick = 'return jumpToUrl(' . GeneralUtility::quoteJSvalue($this->getThisScript() . ltrim($parameters, '&')) . ');'; $theFolderIcon = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . $icon . '</a>'; @@ -81,23 +81,21 @@ class ElementBrowserFolderTreeView extends FolderTreeView */ public function wrapTitle($title, $folderObject, $bank = 0) { - if ($this->ext_isLinkable($folderObject)) { - $parameters = GeneralUtility::implodeArrayForUrl('', $this->linkParameterProvider->getUrlParameters(['identifier' => $folderObject->getCombinedIdentifier()])); - return '<a href="#" onclick="return jumpToUrl(' . htmlspecialchars(GeneralUtility::quoteJSvalue($this->getThisScript() . ltrim($parameters, '&'))) . ');">' . $title . '</a>'; - } - return '<span class="text-muted">' . $title . '</span>'; + $parameters = GeneralUtility::implodeArrayForUrl('', $this->linkParameterProvider->getUrlParameters(['identifier' => $folderObject->getCombinedIdentifier()])); + return '<a href="#" onclick="return jumpToUrl(' . htmlspecialchars(GeneralUtility::quoteJSvalue($this->getThisScript() . ltrim($parameters, '&'))) . ');">' . $title . '</a>'; } /** * Returns TRUE if the input "record" contains a folder which can be linked. * * @param Folder $folderObject Object with information about the folder element. Contains keys like title, uid, path, _title - * @return bool TRUE is returned if the path is found in the web-part of the server and is NOT a recycler or temp folder AND if ->ext_noTempRecyclerDirs is not set. + * @return bool TRUE + * @deprecated since TYPO3 v9, will be removed in TYPO3 v10 */ public function ext_isLinkable(Folder $folderObject) { - $identifier = $folderObject->getIdentifier(); - return !$this->ext_noTempRecyclerDirs || substr($identifier, -7) !== '_temp_/' && substr($identifier, -11) !== '_recycler_/'; + trigger_error('This method is obsolete and will be removed in TYPO3 v10.', E_USER_DEPRECATED); + return true; } /** @@ -148,7 +146,6 @@ class ElementBrowserFolderTreeView extends FolderTreeView $this->scope = [ 'class' => static::class, 'script' => $this->thisScript, - 'ext_noTempRecyclerDirs' => $this->ext_noTempRecyclerDirs, 'browser' => $this->linkParameterProvider->getUrlParameters([]), ]; } diff --git a/typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php b/typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php index 9bc3a3f7b9c97f8a1407775f672f3e2bfeb7e029..162d72f787b015dca7fc618866116c394b099897 100644 --- a/typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php +++ b/typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php @@ -62,12 +62,6 @@ class FolderTreeView extends AbstractTreeView */ protected $iconFactory; - /** - * If file-drag mode is set, temp and recycler folders are filtered out. - * @var bool - */ - public $ext_noTempRecyclerDirs = false; - /** * override to not use a title attribute * @var string @@ -136,7 +130,6 @@ class FolderTreeView extends AbstractTreeView $this->scope = [ 'class' => static::class, 'script' => $this->thisScript, - 'ext_noTempRecyclerDirs' => $this->ext_noTempRecyclerDirs ]; } diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-84145-DeprecateExt_isLinkable.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-84145-DeprecateExt_isLinkable.rst new file mode 100644 index 0000000000000000000000000000000000000000..76c3ca8ff906fa3c24693b26f563b79a8740304e --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-84145-DeprecateExt_isLinkable.rst @@ -0,0 +1,35 @@ +.. include:: ../../Includes.txt + +============================================== +Deprecation: #84145 - Deprecate ext_isLinkable +============================================== + +See :issue:`84145` + +Description +=========== + +Method :php:`TYPO3\CMS\Backend\Tree\View\ElementBrowserFolderTreeView->ext_isLinkable()` +has been deprecated. It always returned true and still does it until removed. + + +Impact +====== + +Little to no impact in extensions, the method behavior usually does not change. + + +Affected Installations +====================== + +Extensions extending the folder tree of the element browser may be affected but +still should not change their behavior. Extension scanner may find usages and +marks them as weak match since the methods appears in other classes as well. + + +Migration +========= + +Don't call :php:`ext_isLinkable()` anymore and assume :php:`true` as return value. + +.. index:: Backend, PHP-API, FullyScanned \ No newline at end of file diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php index fdd91a7cb62576370fe95156eb5b902b43ef9a50..0cbc55ac4c49a6c4502634a24476ab9046059d70 100644 --- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php +++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php @@ -1780,4 +1780,11 @@ return [ 'Deprecation-84118-VariousPublicMethodsOfAdminPanelViewDeprecated.rst', ], ], + 'TYPO3\CMS\Backend\Tree\View\ElementBrowserFolderTreeView->ext_isLinkable' => [ + 'numberOfMandatoryArguments' => 1, + 'maximumNumberOfArguments' => 1, + 'restFiles' => [ + 'Deprecation-84145-DeprecateExt_isLinkable.rst' + ], + ] ];