mirror of
https://github.com/werkraum-media/abtest.git
synced 2024-11-15 05:16:11 +01:00
Merge pull request #1 from CarlosAgrelis/CarlosAgrelis-patch-1
Compatible for TYPO3 V9
This commit is contained in:
commit
8fdd877d4a
2 changed files with 4 additions and 10 deletions
|
@ -45,13 +45,9 @@ class Helper
|
|||
|
||||
$currentPageId = $targetPageId = $tsFeController->id;
|
||||
|
||||
// Get the rootpage_id from realurl config.
|
||||
$realurlConfig = $tsFeController->TYPO3_CONF_VARS['EXTCONF']['realurl'];
|
||||
if (is_array($realurlConfig) && array_key_exists($_SERVER['SERVER_NAME'], $realurlConfig)) {
|
||||
$rootpage_id = $realurlConfig[$_SERVER['SERVER_NAME']]['pagePath']['rootpage_id'];
|
||||
} else {
|
||||
$rootpage_id = $realurlConfig['_DEFAULT']['pagePath']['rootpage_id'];
|
||||
}
|
||||
// Get the rootpage_id
|
||||
$pageRepository = GeneralUtility::makeInstance(PageRepository::class);
|
||||
$rootpage_id = array_pop($pageRepository->getRootLine($GLOBALS['TSFE']->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) {
|
||||
|
@ -63,7 +59,6 @@ class Helper
|
|||
}
|
||||
}
|
||||
|
||||
$pageRepository = GeneralUtility::makeInstance(PageRepository::class);
|
||||
$currentPagePropertiesArray = $pageRepository->getPage($currentPageId);
|
||||
|
||||
$pageBPageId = $currentPagePropertiesArray['tx_abtest2_b_id'];
|
||||
|
|
|
@ -26,8 +26,7 @@ $EM_CONF[$_EXTKEY] = [
|
|||
[
|
||||
'depends' =>
|
||||
[
|
||||
'typo3' => '7.6.0-8.7.99',
|
||||
'realurl' => '2.0.0-0.0.0',
|
||||
'typo3' => '7.6.0-9.5.99',
|
||||
],
|
||||
'conflicts' =>
|
||||
[],
|
||||
|
|
Loading…
Reference in a new issue