mirror of
https://github.com/werkraum-media/abtest.git
synced 2024-11-15 08:16:10 +01:00
Removing realurl config for TYPO3 version 9
This commit is contained in:
parent
68a32de089
commit
9182a69302
1 changed files with 3 additions and 8 deletions
|
@ -45,13 +45,9 @@ class Helper
|
||||||
|
|
||||||
$currentPageId = $targetPageId = $tsFeController->id;
|
$currentPageId = $targetPageId = $tsFeController->id;
|
||||||
|
|
||||||
// Get the rootpage_id from realurl config.
|
// Get the rootpage_id
|
||||||
$realurlConfig = $tsFeController->TYPO3_CONF_VARS['EXTCONF']['realurl'];
|
$pageRepository = GeneralUtility::makeInstance(PageRepository::class);
|
||||||
if (is_array($realurlConfig) && array_key_exists($_SERVER['SERVER_NAME'], $realurlConfig)) {
|
$rootpage_id = array_pop($pageRepository->getRootLine($GLOBALS['TSFE']->id));
|
||||||
$rootpage_id = $realurlConfig[$_SERVER['SERVER_NAME']]['pagePath']['rootpage_id'];
|
|
||||||
} else {
|
|
||||||
$rootpage_id = $realurlConfig['_DEFAULT']['pagePath']['rootpage_id'];
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the ID is NULL, then we set this value to the rootpage_id. NULL is the "Home"page, ID is a specific sub-page, e.g. www.domain.de (NULL) - www.domain.de/page.html (ID)
|
// If the ID is NULL, then we set this value to the rootpage_id. NULL is the "Home"page, ID is a specific sub-page, e.g. www.domain.de (NULL) - www.domain.de/page.html (ID)
|
||||||
if (!$currentPageId) {
|
if (!$currentPageId) {
|
||||||
|
@ -63,7 +59,6 @@ class Helper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$pageRepository = GeneralUtility::makeInstance(PageRepository::class);
|
|
||||||
$currentPagePropertiesArray = $pageRepository->getPage($currentPageId);
|
$currentPagePropertiesArray = $pageRepository->getPage($currentPageId);
|
||||||
|
|
||||||
$pageBPageId = $currentPagePropertiesArray['tx_abtest2_b_id'];
|
$pageBPageId = $currentPagePropertiesArray['tx_abtest2_b_id'];
|
||||||
|
|
Loading…
Reference in a new issue