Last active
February 13, 2018 21:29
-
-
Save jrenggli/16d0fd44549794f6703324f44160444f to your computer and use it in GitHub Desktop.
typo3-cms-linkhandler-record-link-migration.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 316ce38b479321c0227a74b545786ac256f5d13b | |
Author: Jonas Renggli <[email protected]> | |
Date: Mon Feb 12 16:48:09 2018 +0100 | |
[FEATURE] Add migration for recordLinks from legacy EXT:linkhandler | |
diff --git a/typo3/sysext/core/Classes/LinkHandling/LegacyLinkNotationConverter.php b/typo3/sysext/core/Classes/LinkHandling/LegacyLinkNotationConverter.php | |
index a89b67813e..0539cc6d4f 100644 | |
--- a/typo3/sysext/core/Classes/LinkHandling/LegacyLinkNotationConverter.php | |
+++ b/typo3/sysext/core/Classes/LinkHandling/LegacyLinkNotationConverter.php | |
@@ -62,6 +62,9 @@ class LegacyLinkNotationConverter | |
// Resolve FAL-api "file:UID-of-sys_file-record" and "file:combined-identifier" | |
if (stripos($linkParameter, 'file:') === 0) { | |
$result = $this->getFileOrFolderObjectFromMixedIdentifier(substr($linkParameter, 5)); | |
+ } elseif (stripos($linkParameter, 'record:') === 0) { | |
+ $linkParameterParts = GeneralUtility::trimExplode(':', $linkParameter); | |
+ $result['url'] = sprintf('t3://record?identifier=%s&uid=%d', $linkParameterParts[1], $linkParameterParts[3]); | |
} elseif (GeneralUtility::validEmail(parse_url($linkParameter, PHP_URL_PATH))) { | |
$result['type'] = LinkService::TYPE_EMAIL; | |
$result['email'] = $linkParameter; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment