fix: properly forward return urls where missing
This commit is contained in:
@@ -192,6 +192,21 @@ class AppRuntime implements RuntimeExtensionInterface
|
||||
return rawurlencode($masterRequest->getRequestUri());
|
||||
}
|
||||
|
||||
/**
|
||||
* Passes the return url of the current page on to the next one.
|
||||
*
|
||||
* Used by links that lead deeper into a detail view or trigger an action on it:
|
||||
* they have to keep pointing back at where the user originally came from instead
|
||||
* of at the page they sit on. Null when there is nothing to pass on, so that the
|
||||
* url generator drops the parameter rather than emitting an empty one.
|
||||
*/
|
||||
public function getForwardedReturnUrl(): ?string
|
||||
{
|
||||
$returnUrl = $this->requestStack->getMainRequest()?->query->get('r');
|
||||
|
||||
return is_string($returnUrl) && '' !== $returnUrl ? $returnUrl : null;
|
||||
}
|
||||
|
||||
public function renderQaAttribute(string $label, ?string $value = null): string
|
||||
{
|
||||
if ('test' !== $this->environment) {
|
||||
|
||||
Reference in New Issue
Block a user