Commit 24ddaf55 authored by Benedikt Huss's avatar Benedikt Huss Committed by Thomas Löffler

[PATCH] Only add language parameter to URL when using one tree method

parent a8a0fb7c
Pipeline #543 failed
......@@ -338,16 +338,19 @@ class LanguageDetection extends AbstractPlugin
$sys_page->init(0);
$page = $sys_page->getPage($preferredLanguageOrPageUid);
}
$url = $this->cObj->typoLink_URL(
[
'parameter' => $page['uid'],
'addQueryString' => true,
'addQueryString.' => [
'exclude' => 'id'
],
'additionalParams' => '&' . $this->conf['languageGPVar'] . '=' . $preferredLanguageOrPageUid
$urlParams = [
'parameter' => $page['uid'],
'addQueryString' => true,
'addQueryString.' => [
'exclude' => 'id'
]
);
];
if ($this->conf['useOneTreeMethod']) {
$urlParams['additionalParams'] = '&' . $this->conf['languageGPVar'] . '=' . $preferredLanguageOrPageUid;
}
$url = $this->cObj->typoLink_URL($urlParams);
// Prefer the base URL if available
if (strlen($this->getTSFE()->baseUrl) > 1) {
......
Markdown is supported
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