Skip to content

Commit

Permalink
[BUGFIX] Allow any doktype for linking beside sysfolder and recycler
Browse files Browse the repository at this point in the history
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/+/75105
Tested-by: core-ci <typo3@b13.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
NeoBlack authored and bmack committed Jul 12, 2022
1 parent 764d2a5 commit f9636a9
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -140,7 +140,12 @@ public function printTree($treeArr = '')
*/
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);
}

/**
Expand Down

0 comments on commit f9636a9

Please sign in to comment.