CGL fixes
This commit is contained in:
@@ -57,8 +57,7 @@ class AjaxViewHelper extends ActionViewHelper
|
|||||||
array $arguments,
|
array $arguments,
|
||||||
\Closure $renderChildrenClosure,
|
\Closure $renderChildrenClosure,
|
||||||
RenderingContextInterface $renderingContext
|
RenderingContextInterface $renderingContext
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
// Determine page type from format argument
|
// Determine page type from format argument
|
||||||
if (strtolower(trim($arguments['format'])) === 'json') {
|
if (strtolower(trim($arguments['format'])) === 'json') {
|
||||||
$arguments['pageType'] = self::PAGE_TYPE_JSON;
|
$arguments['pageType'] = self::PAGE_TYPE_JSON;
|
||||||
@@ -66,10 +65,10 @@ class AjaxViewHelper extends ActionViewHelper
|
|||||||
$arguments['pageType'] = self::PAGE_TYPE_HTML;
|
$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'] = '';
|
$arguments['format'] = '';
|
||||||
|
|
||||||
// Use current page uid as target unless provided
|
// Use root page uid as target unless provided
|
||||||
if ($arguments['pageUid'] === null) {
|
if ($arguments['pageUid'] === null) {
|
||||||
$rootlineUtility = new RootlineUtility($GLOBALS['TSFE']->id);
|
$rootlineUtility = new RootlineUtility($GLOBALS['TSFE']->id);
|
||||||
$rootline = $rootlineUtility->get();
|
$rootline = $rootlineUtility->get();
|
||||||
@@ -80,10 +79,11 @@ class AjaxViewHelper extends ActionViewHelper
|
|||||||
// Force absolute urls
|
// Force absolute urls
|
||||||
$arguments['absolute'] = true;
|
$arguments['absolute'] = true;
|
||||||
|
|
||||||
// Disable cache hash
|
return parent::renderStatic(
|
||||||
$arguments['noCacheHash'] = true;
|
$arguments,
|
||||||
|
$renderChildrenClosure,
|
||||||
return parent::renderStatic($arguments, $renderChildrenClosure, $renderingContext);
|
$renderingContext
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user