diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-02-17 09:43:02 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-02-17 09:43:02 +0400 |
commit | 4c5f26b8e5ff5a2c38212d5aa9cc1fcb1ea87206 (patch) | |
tree | 98ecdd6da73b08cff8635899679c0bc2b720a16c /core/Tracker/GoalManager.php | |
parent | 6d01411ea02f93048ac7d09a29d3a03c7a382015 (diff) |
Fixes lowercase campaign name and keyword refs #4260
this fixes a bug and the build failure - thanks travis :)
Diffstat (limited to 'core/Tracker/GoalManager.php')
-rw-r--r-- | core/Tracker/GoalManager.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/core/Tracker/GoalManager.php b/core/Tracker/GoalManager.php index ff73d7695c..6fc3233126 100644 --- a/core/Tracker/GoalManager.php +++ b/core/Tracker/GoalManager.php @@ -314,8 +314,7 @@ class GoalManager $time = $referrerTimestamp; } } - $name = Common::mb_strtolower($name); - $keyword = Common::mb_strtolower($keyword); + $this->setCampaignValuesToLowercase($type, $name, $keyword); $goal += array( 'referer_type' => $type, @@ -871,4 +870,21 @@ class GoalManager } return true; } + + /** + * @param $type + * @param $name + * @param $keyword + */ + protected function setCampaignValuesToLowercase($type, &$name, &$keyword) + { + if ($type === Common::REFERRER_TYPE_CAMPAIGN) { + if (!empty($name)) { + $name = Common::mb_strtolower($name); + } + if (!empty($keyword)) { + $keyword = Common::mb_strtolower($keyword); + } + } + } } |