Skip to content

Commit

Permalink
[BUGFIX] Allow config.linkVars to be added for linking to pages with …
Browse files Browse the repository at this point in the history
…site config

Due to the refactoring yesterday, the TypoScript option
config.linkVars was removed, but is still a valid use-case to be added.

Resolves: #86054
Releases: master
Change-Id: I6d42c82f474668b62143982b8d9f2adf9b735935
Reviewed-on: https://review.typo3.org/58097
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
bmack authored and lolli42 committed Sep 1, 2018
1 parent 555bdae commit a11734f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php
Expand Up @@ -181,6 +181,14 @@ public function build(array &$linkDetails, string $linkText, string $target, arr
if ($siteOfTargetPage instanceof Site) {
$queryParameters = [];
parse_str($addQueryParams, $queryParameters);
// get config.linkVars and prepend
if ($tsfe->linkVars) {
$globalQueryParameters = [];
parse_str($tsfe->linkVars, $globalQueryParameters);
if (!empty($globalQueryParameters)) {
$queryParameters = array_merge_recursive($globalQueryParameters, $queryParameters);
}
}
unset($queryParameters['id'], $queryParameters['L']);
if ($pageType) {
$queryParameters['type'] = (int)$pageType;
Expand Down

0 comments on commit a11734f

Please sign in to comment.