mirror of
https://github.com/werkraum-media/abtest.git
synced 2024-11-14 18:36:10 +01:00
Fix for additional header/footer data
This commit is contained in:
parent
818602a1e0
commit
c4ff8f2fee
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue