[BUGFIX] Properly detect record link dialog tab 74/54374/2
authorStanislas Rolland <typo3@sjbr.ca>
Wed, 11 Oct 2017 19:00:03 +0000 (15:00 -0400)
committerMarkus Klein <markus.klein@typo3.org>
Thu, 12 Oct 2017 09:15:12 +0000 (11:15 +0200)
RecordLinkHandler->canHandleLink should check record identifier,
otherwise the element browser may open the wrong tab when multiple
record identifiers are configured.

Resolves: #82737
Releases: master, 8.7
Change-Id: Ie12c6d7484bdb51577dfe02a653e80fe1d7b63ea
Reviewed-on: https://review.typo3.org/54374
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/recordlist/Classes/LinkHandler/RecordLinkHandler.php

index b73203c..c6a48d9 100644 (file)
@@ -81,7 +81,7 @@ class RecordLinkHandler extends AbstractLinkHandler implements LinkHandlerInterf
      */
     public function canHandleLink(array $linkParts): bool
     {
-        if (!$linkParts['url'] || !isset($linkParts['url']['identifier'])) {
+        if (!$linkParts['url'] || !isset($linkParts['url']['identifier']) || $linkParts['url']['identifier'] !== $this->identifier) {
             return false;
         }