diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-25 08:30:50 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-25 08:30:50 +0400 |
commit | c7f06bb82097db89b746de503c224011a8c7f0a8 (patch) | |
tree | c2f4118978a58ecc9a87f7633830971427877bd2 /plugins/CoreHome/Columns | |
parent | 6526e28b143192611cabfcba4e0d8d5cd92464ad (diff) |
started to handle changes to dimensions, for instance if a new dimension is added the platform should detect this and run an update script. also if a dimension suddenly handles new cases such as conversion it should automatically add a column to log_conversion after a user confirms. Have not tested update and/or installation yet
Diffstat (limited to 'plugins/CoreHome/Columns')
-rw-r--r-- | plugins/CoreHome/Columns/IdSite.php | 2 | ||||
-rw-r--r-- | plugins/CoreHome/Columns/VisitFirstActionTime.php | 4 | ||||
-rw-r--r-- | plugins/CoreHome/Columns/VisitGoalBuyer.php | 6 | ||||
-rw-r--r-- | plugins/CoreHome/Columns/VisitGoalConverted.php | 4 | ||||
-rw-r--r-- | plugins/CoreHome/Columns/VisitLastActionTime.php | 2 | ||||
-rw-r--r-- | plugins/CoreHome/Columns/VisitTotalTime.php | 4 | ||||
-rw-r--r-- | plugins/CoreHome/Columns/VisitorDaysSinceFirst.php | 6 | ||||
-rw-r--r-- | plugins/CoreHome/Columns/VisitorDaysSinceOrder.php | 6 | ||||
-rw-r--r-- | plugins/CoreHome/Columns/VisitorReturning.php | 6 | ||||
-rw-r--r-- | plugins/CoreHome/Columns/VisitsCount.php | 6 |
10 files changed, 23 insertions, 23 deletions
diff --git a/plugins/CoreHome/Columns/IdSite.php b/plugins/CoreHome/Columns/IdSite.php index c367764c72..471e01f98d 100644 --- a/plugins/CoreHome/Columns/IdSite.php +++ b/plugins/CoreHome/Columns/IdSite.php @@ -16,7 +16,7 @@ use Piwik\Tracker\Visitor; class IdSite extends VisitDimension { - protected $fieldName = 'idsite'; + protected $columnName = 'idsite'; // we do not install or define column definition here as we need to create this column when installing as there is // an index on it. Currently we do not define the index here... although we could overwrite the install() method // and add column 'idsite' and add index. Problem is there is also an index diff --git a/plugins/CoreHome/Columns/VisitFirstActionTime.php b/plugins/CoreHome/Columns/VisitFirstActionTime.php index d74458dc9f..1836fe8c73 100644 --- a/plugins/CoreHome/Columns/VisitFirstActionTime.php +++ b/plugins/CoreHome/Columns/VisitFirstActionTime.php @@ -16,8 +16,8 @@ use Piwik\Tracker\Visitor; class VisitFirstActionTime extends VisitDimension { - protected $fieldName = 'visit_first_action_time'; - protected $fieldType = 'DATETIME NOT NULL'; + protected $columnName = 'visit_first_action_time'; + protected $columnType = 'DATETIME NOT NULL'; public function getName() { diff --git a/plugins/CoreHome/Columns/VisitGoalBuyer.php b/plugins/CoreHome/Columns/VisitGoalBuyer.php index d371d85ec3..5a1f98279c 100644 --- a/plugins/CoreHome/Columns/VisitGoalBuyer.php +++ b/plugins/CoreHome/Columns/VisitGoalBuyer.php @@ -31,8 +31,8 @@ class VisitGoalBuyer extends VisitDimension self::TYPE_BUYER_ORDERED_AND_OPEN_CART => 'orderedThenAbandonedCart', ); - protected $fieldName = 'visit_goal_buyer'; - protected $fieldType = 'TINYINT(1) NOT NULL'; + protected $columnName = 'visit_goal_buyer'; + protected $columnType = 'TINYINT(1) NOT NULL'; protected function configureSegments() { @@ -72,7 +72,7 @@ class VisitGoalBuyer extends VisitDimension */ public function onExistingVisit(Request $request, Visitor $visitor, $action) { - $goalBuyer = $visitor->getVisitorColumn($this->fieldName); + $goalBuyer = $visitor->getVisitorColumn($this->columnName); // Ecommerce buyer status $visitEcommerceStatus = $this->getBuyerType($request, $goalBuyer); diff --git a/plugins/CoreHome/Columns/VisitGoalConverted.php b/plugins/CoreHome/Columns/VisitGoalConverted.php index 66398b9ce3..56d13f7643 100644 --- a/plugins/CoreHome/Columns/VisitGoalConverted.php +++ b/plugins/CoreHome/Columns/VisitGoalConverted.php @@ -16,8 +16,8 @@ use Piwik\Tracker\Visitor; class VisitGoalConverted extends VisitDimension { - protected $fieldName = 'visit_goal_converted'; - protected $fieldType = 'TINYINT(1) NOT NULL'; + protected $columnName = 'visit_goal_converted'; + protected $columnType = 'TINYINT(1) NOT NULL'; protected function configureSegments() { diff --git a/plugins/CoreHome/Columns/VisitLastActionTime.php b/plugins/CoreHome/Columns/VisitLastActionTime.php index b4ad30c214..e261f81ef4 100644 --- a/plugins/CoreHome/Columns/VisitLastActionTime.php +++ b/plugins/CoreHome/Columns/VisitLastActionTime.php @@ -16,7 +16,7 @@ use Piwik\Tracker\Visitor; class VisitLastActionTime extends VisitDimension { - protected $fieldName = 'visit_last_action_time'; + protected $columnName = 'visit_last_action_time'; // we do not install or define column definition here as we need to create this column when installing as there is // an index on it. Currently we do not define the index here... although we could overwrite the install() method // and add column 'visit_last_action_time' and add index. Problem is there is also an index diff --git a/plugins/CoreHome/Columns/VisitTotalTime.php b/plugins/CoreHome/Columns/VisitTotalTime.php index 36f885b135..a529bbdef3 100644 --- a/plugins/CoreHome/Columns/VisitTotalTime.php +++ b/plugins/CoreHome/Columns/VisitTotalTime.php @@ -18,8 +18,8 @@ use Piwik\Tracker\Visitor; class VisitTotalTime extends VisitDimension { - protected $fieldName = 'visit_total_time'; - protected $fieldType = 'SMALLINT(5) UNSIGNED NOT NULL'; + protected $columnName = 'visit_total_time'; + protected $columnType = 'SMALLINT(5) UNSIGNED NOT NULL'; protected function configureSegments() { diff --git a/plugins/CoreHome/Columns/VisitorDaysSinceFirst.php b/plugins/CoreHome/Columns/VisitorDaysSinceFirst.php index 2bb1f3c2e2..22e6bb5850 100644 --- a/plugins/CoreHome/Columns/VisitorDaysSinceFirst.php +++ b/plugins/CoreHome/Columns/VisitorDaysSinceFirst.php @@ -16,8 +16,8 @@ use Piwik\Tracker\Visitor; class VisitorDaysSinceFirst extends VisitDimension { - protected $fieldName = 'visitor_days_since_first'; - protected $fieldType = 'SMALLINT(5) UNSIGNED NOT NULL'; + protected $columnName = 'visitor_days_since_first'; + protected $columnType = 'SMALLINT(5) UNSIGNED NOT NULL'; protected function configureSegments() { @@ -52,6 +52,6 @@ class VisitorDaysSinceFirst extends VisitDimension */ public function onRecordGoal(Request $request, Visitor $visitor, $action) { - return $visitor->getVisitorColumn($this->fieldName); + return $visitor->getVisitorColumn($this->columnName); } }
\ No newline at end of file diff --git a/plugins/CoreHome/Columns/VisitorDaysSinceOrder.php b/plugins/CoreHome/Columns/VisitorDaysSinceOrder.php index 8a3b6b0dbe..5b961b27f3 100644 --- a/plugins/CoreHome/Columns/VisitorDaysSinceOrder.php +++ b/plugins/CoreHome/Columns/VisitorDaysSinceOrder.php @@ -16,8 +16,8 @@ use Piwik\Tracker\Visitor; class VisitorDaysSinceOrder extends VisitDimension { - protected $fieldName = 'visitor_days_since_order'; - protected $fieldType = 'SMALLINT(5) UNSIGNED NOT NULL'; + protected $columnName = 'visitor_days_since_order'; + protected $columnType = 'SMALLINT(5) UNSIGNED NOT NULL'; protected function configureSegments() { @@ -59,6 +59,6 @@ class VisitorDaysSinceOrder extends VisitDimension */ public function onRecordGoal(Request $request, Visitor $visitor, $action) { - return $visitor->getVisitorColumn($this->fieldName); + return $visitor->getVisitorColumn($this->columnName); } }
\ No newline at end of file diff --git a/plugins/CoreHome/Columns/VisitorReturning.php b/plugins/CoreHome/Columns/VisitorReturning.php index aed4ec4d72..6f66225cb8 100644 --- a/plugins/CoreHome/Columns/VisitorReturning.php +++ b/plugins/CoreHome/Columns/VisitorReturning.php @@ -21,8 +21,8 @@ class VisitorReturning extends VisitDimension const IS_RETURNING = 1; const IS_NEW = 0; - protected $fieldName = 'visitor_returning'; - protected $fieldType = 'TINYINT(1) NOT NULL'; + protected $columnName = 'visitor_returning'; + protected $columnType = 'TINYINT(1) NOT NULL'; protected $conversionField = true; protected function configureSegments() @@ -79,6 +79,6 @@ class VisitorReturning extends VisitDimension */ public function onRecordGoal(Request $request, Visitor $visitor, $action) { - return $visitor->getVisitorColumn($this->fieldName); + return $visitor->getVisitorColumn($this->columnName); } }
\ No newline at end of file diff --git a/plugins/CoreHome/Columns/VisitsCount.php b/plugins/CoreHome/Columns/VisitsCount.php index d1e0069df6..26e29fc751 100644 --- a/plugins/CoreHome/Columns/VisitsCount.php +++ b/plugins/CoreHome/Columns/VisitsCount.php @@ -16,8 +16,8 @@ use Piwik\Tracker\Visitor; class VisitsCount extends VisitDimension { - protected $fieldName = 'visitor_count_visits'; - protected $fieldType = 'SMALLINT(5) UNSIGNED NOT NULL'; + protected $columnName = 'visitor_count_visits'; + protected $columnType = 'SMALLINT(5) UNSIGNED NOT NULL'; public function getName() { @@ -52,6 +52,6 @@ class VisitsCount extends VisitDimension */ public function onRecordGoal(Request $request, Visitor $visitor, $action) { - return $visitor->getVisitorColumn($this->fieldName); + return $visitor->getVisitorColumn($this->columnName); } }
\ No newline at end of file |