Skip to content
Snippets Groups Projects
Commit 83538c09 authored by Frank Naegler's avatar Frank Naegler Committed by Benni Mack
Browse files

[BUGFIX] Allow any doktype for linking beside sysfolder and recycler

Since TYPO3 version 10.4, the custom page type is not restricted
to any range of numbers.
This limitation no longer exists, and any number is allowed.

The ElementBrowserPageTreeView just now also respect this and
allows to link to other any doktype beside:
- PageRepository::DOKTYPE_RECYCLER
- PageRepository::DOKTYPE_SYSFOLDER

Resolves: #97626
Releases: main, 11.5, 10.4
Change-Id: Iffc3f705f74cc7516464fdb00adb456141657948
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75133


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent d8d97f59
Branches
Tags
No related merge requests found
......@@ -159,7 +159,12 @@ class ElementBrowserPageTreeView extends BrowseTreeView
*/
public function ext_isLinkable($doktype, $uid)
{
return $uid && $doktype < PageRepository::DOKTYPE_SPACER;
$notLinkableDokTypes = [
PageRepository::DOKTYPE_SPACER,
PageRepository::DOKTYPE_SYSFOLDER,
PageRepository::DOKTYPE_RECYCLER,
];
return $uid && !in_array($doktype, $notLinkableDokTypes, true);
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment