From c4ff8f2fee66b597ddd0061e05088c7bd77424df Mon Sep 17 00:00:00 2001 From: Sven Wappler Date: Mon, 11 Dec 2017 20:12:34 +0100 Subject: [PATCH] Fix for additional header/footer data --- Classes/Helper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/Helper.php b/Classes/Helper.php index cb65d13..da45731 100644 --- a/Classes/Helper.php +++ b/Classes/Helper.php @@ -64,16 +64,18 @@ class Helper if ($pageBPageId) { + $pageBPropertiesArray = $pageRepository->getPage($pageBPageId); $cookieValue = $_COOKIE['abtest2']; if ($cookieValue === 'b') { $targetPageId = $pageBPageId; + $currentPagePropertiesArray = $pageBPropertiesArray; } else if ($cookieValue === 'a') { } else { $cookieValue = 'a'; /* select least used page */ - $pageBPropertiesArray = $pageRepository->getPage($pageBPageId); + if ((int)$currentPagePropertiesArray['tx_abtest2_counter'] > (int)$pageBPropertiesArray['tx_abtest2_counter']) { /* take b */ $targetPageId = $pageBPageId;