Url: Remove "/" in front of path if the url has a user parameter
refs #12133
This commit is contained in:
parent
dda7311226
commit
1c55351460
|
@ -189,7 +189,7 @@ class Url
|
||||||
if (isset($urlParts['path'])) {
|
if (isset($urlParts['path'])) {
|
||||||
$urlPath = $urlParts['path'];
|
$urlPath = $urlParts['path'];
|
||||||
if ($urlPath && $urlPath[0] === '/') {
|
if ($urlPath && $urlPath[0] === '/') {
|
||||||
if ($urlObject->isExternal()) {
|
if ($urlObject->isExternal() || isset($urlParts['user'])) {
|
||||||
$urlPath = substr($urlPath, 1);
|
$urlPath = substr($urlPath, 1);
|
||||||
} else {
|
} else {
|
||||||
$requestBaseUrl = $request->getBaseUrl();
|
$requestBaseUrl = $request->getBaseUrl();
|
||||||
|
@ -198,12 +198,12 @@ class Url
|
||||||
$urlObject->setBasePath($requestBaseUrl);
|
$urlObject->setBasePath($requestBaseUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif (!$urlObject->isExternal()) {
|
} elseif (! $urlObject->isExternal()) {
|
||||||
$urlObject->setBasePath($request->getBaseUrl());
|
$urlObject->setBasePath($request->getBaseUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
$urlObject->setPath($urlPath);
|
$urlObject->setPath($urlPath);
|
||||||
} elseif (!$urlObject->isExternal()) {
|
} elseif (! $urlObject->isExternal()) {
|
||||||
$urlObject->setBasePath($request->getBaseUrl());
|
$urlObject->setBasePath($request->getBaseUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue