CGL fixes

This commit is contained in:
Björn Fromme
2019-06-07 14:42:34 +02:00
parent 5fed619018
commit 841ff91dc9
@@ -57,8 +57,7 @@ class AjaxViewHelper extends ActionViewHelper
array $arguments,
\Closure $renderChildrenClosure,
RenderingContextInterface $renderingContext
)
{
) {
// Determine page type from format argument
if (strtolower(trim($arguments['format'])) === 'json') {
$arguments['pageType'] = self::PAGE_TYPE_JSON;
@@ -66,10 +65,10 @@ class AjaxViewHelper extends ActionViewHelper
$arguments['pageType'] = self::PAGE_TYPE_HTML;
}
// Unset argument to keep it out of resulting url
// Reset argument to keep it out of resulting url
$arguments['format'] = '';
// Use current page uid as target unless provided
// Use root page uid as target unless provided
if ($arguments['pageUid'] === null) {
$rootlineUtility = new RootlineUtility($GLOBALS['TSFE']->id);
$rootline = $rootlineUtility->get();
@@ -80,10 +79,11 @@ class AjaxViewHelper extends ActionViewHelper
// Force absolute urls
$arguments['absolute'] = true;
// Disable cache hash
$arguments['noCacheHash'] = true;
return parent::renderStatic($arguments, $renderChildrenClosure, $renderingContext);
return parent::renderStatic(
$arguments,
$renderChildrenClosure,
$renderingContext
);
}
}