Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2014-03-26 14:12:45 +0400
committermattab <matthieu.aubry@gmail.com>2014-03-26 14:12:45 +0400
commit25bfb481074bf6a7e545e88a655a41ce99bf3744 (patch)
treeef89f73beda4c1a6aaeda1f88365e86ec686257f
parent12d78a18b41e47f6ae4a72519ff7375cebb7dd35 (diff)
Refs #4909 Only update the visitEcommerceStatus flag if it's different from current value.
-rw-r--r--core/Tracker/Visit.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php
index ca35af28ed..470ec3eb4c 100644
--- a/core/Tracker/Visit.php
+++ b/core/Tracker/Visit.php
@@ -944,7 +944,9 @@ class Visit implements VisitInterface
// Ecommerce buyer status
$visitEcommerceStatus = $this->goalManager->getBuyerType($this->visitorInfo['visit_goal_buyer']);
- if($visitEcommerceStatus != GoalManager::TYPE_BUYER_NONE) {
+ if($visitEcommerceStatus != GoalManager::TYPE_BUYER_NONE
+ // only update if the value has changed (prevents overwriting the value in case a request has updated it in the meantime)
+ && $visitEcommerceStatus != $this->visitorInfo['visit_goal_buyer']) {
$valuesToUpdate['visit_goal_buyer'] = $visitEcommerceStatus;
}