diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-04-03 06:24:11 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-04-03 06:24:11 +0400 |
commit | 26043d38220da7cb0bebe1aed40ce472647f30d4 (patch) | |
tree | 0f76e908a92ba661abd361f2678bf2cacaa58a13 /core | |
parent | 625a29757d5d94194fb152508752123db8feb0de (diff) |
moving getMaxCustomVariables to CustomVariables class, a model should not really care about caching etc
Diffstat (limited to 'core')
-rw-r--r-- | core/Tracker/GoalManager.php | 4 | ||||
-rw-r--r-- | core/Tracker/Request.php | 4 | ||||
-rw-r--r-- | core/Tracker/Visit.php | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/core/Tracker/GoalManager.php b/core/Tracker/GoalManager.php index 7771172e82..c4e7fb67db 100644 --- a/core/Tracker/GoalManager.php +++ b/core/Tracker/GoalManager.php @@ -12,8 +12,8 @@ use Exception; use Piwik\Common; use Piwik\Config; use Piwik\Piwik; +use Piwik\Plugins\CustomVariables\CustomVariables; use Piwik\Tracker; -use Piwik\Plugins\CustomVariables\Model as CustomVariablesModel; /** */ @@ -227,7 +227,7 @@ class GoalManager } // Copy Custom Variables from Visit row to the Goal conversion - for ($i = 1; $i <= CustomVariablesModel::getMaxCustomVariables(); $i++) { + for ($i = 1; $i <= CustomVariables::getMaxCustomVariables(); $i++) { if (isset($visitorInformation['custom_var_k' . $i]) && strlen($visitorInformation['custom_var_k' . $i]) ) { diff --git a/core/Tracker/Request.php b/core/Tracker/Request.php index 80eb062733..ab79d5f470 100644 --- a/core/Tracker/Request.php +++ b/core/Tracker/Request.php @@ -14,9 +14,9 @@ use Piwik\Config; use Piwik\Cookie; use Piwik\IP; use Piwik\Piwik; +use Piwik\Plugins\CustomVariables\CustomVariables; use Piwik\Registry; use Piwik\Tracker; -use Piwik\Plugins\CustomVariables\Model as CustomVariablesModel; /** * The Request object holding the http parameters for this tracking request. Use getParam() to fetch a named parameter. @@ -380,7 +380,7 @@ class Request public static function truncateCustomVariable($input) { - return substr(trim($input), 0, CustomVariablesModel::getMaxLengthCustomVariables()); + return substr(trim($input), 0, CustomVariables::getMaxLengthCustomVariables()); } protected function shouldUseThirdPartyCookie() diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php index 639db2f939..5926e8f1e2 100644 --- a/core/Tracker/Visit.php +++ b/core/Tracker/Visit.php @@ -13,9 +13,9 @@ use Piwik\Common; use Piwik\Config; use Piwik\IP; use Piwik\Piwik; +use Piwik\Plugins\CustomVariables\CustomVariables; use Piwik\Tracker; use UserAgentParser; -use Piwik\Plugins\CustomVariables\Model as CustomVariablesModel; /** * Class used to handle a Visit. @@ -397,7 +397,7 @@ class Visit implements VisitInterface $selectCustomVariables = ''; // No custom var were found in the request, so let's copy the previous one in a potential conversion later if (!$this->visitorCustomVariables) { - $maxCustomVariables = CustomVariablesModel::getMaxCustomVariables(); + $maxCustomVariables = CustomVariables::getMaxCustomVariables(); for ($index = 1; $index <= $maxCustomVariables; $index++) { $selectCustomVariables .= ', custom_var_k' . $index . ', custom_var_v' . $index; @@ -513,7 +513,7 @@ class Visit implements VisitInterface // Custom Variables copied from Visit in potential later conversion if (!empty($selectCustomVariables)) { - for ($i = 1; $i <= CustomVariablesModel::getMaxCustomVariables(); $i++) { + for ($i = 1; $i <= CustomVariables::getMaxCustomVariables(); $i++) { if (isset($visitRow['custom_var_k' . $i]) && strlen($visitRow['custom_var_k' . $i]) ) { |