diff options
author | sgiehl <stefan@piwik.org> | 2014-10-24 00:34:37 +0400 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2014-10-24 00:34:37 +0400 |
commit | d30c66298fbb4fbdbac83c07601e31941f5b5c5f (patch) | |
tree | 595e7bce2635aed2ff5f0273a334d606cbe2f6a1 /plugins/DevicesDetection | |
parent | 390f825495b94914339a7979effd4e49687f9f08 (diff) |
moved columns settings like segments to devicesdetection plugin and removed them from usersettings plugin
Diffstat (limited to 'plugins/DevicesDetection')
-rw-r--r-- | plugins/DevicesDetection/Columns/BrowserName.php | 13 | ||||
-rw-r--r-- | plugins/DevicesDetection/Columns/BrowserVersion.php | 13 | ||||
-rw-r--r-- | plugins/DevicesDetection/Columns/Os.php | 13 |
3 files changed, 36 insertions, 3 deletions
diff --git a/plugins/DevicesDetection/Columns/BrowserName.php b/plugins/DevicesDetection/Columns/BrowserName.php index 1237d6676b..16b0897199 100644 --- a/plugins/DevicesDetection/Columns/BrowserName.php +++ b/plugins/DevicesDetection/Columns/BrowserName.php @@ -9,6 +9,7 @@ namespace Piwik\Plugins\DevicesDetection\Columns; use Piwik\Piwik; +use Piwik\Plugins\DevicesDetection\Segment; use Piwik\Tracker\Request; use Piwik\Tracker\Visitor; use Piwik\Tracker\Action; @@ -16,10 +17,20 @@ use Piwik\Tracker\Action; class BrowserName extends Base { protected $columnName = 'config_browser_name'; + protected $columnType = 'VARCHAR(10) NOT NULL'; + + protected function configureSegments() + { + $segment = new Segment(); + $segment->setSegment('browserCode'); + $segment->setName('UserSettings_ColumnBrowser'); + $segment->setAcceptedValues('FF, IE, CH, SF, OP, etc.'); + $this->addSegment($segment); + } public function getName() { - return Piwik::translate('UserSettings_BrowserFamilies'); + return Piwik::translate('UserSettings_ColumnBrowser'); } /** diff --git a/plugins/DevicesDetection/Columns/BrowserVersion.php b/plugins/DevicesDetection/Columns/BrowserVersion.php index 1fa60f3ab2..87f7815c8a 100644 --- a/plugins/DevicesDetection/Columns/BrowserVersion.php +++ b/plugins/DevicesDetection/Columns/BrowserVersion.php @@ -9,6 +9,7 @@ namespace Piwik\Plugins\DevicesDetection\Columns; use Piwik\Piwik; +use Piwik\Plugins\DevicesDetection\Segment; use Piwik\Tracker\Request; use Piwik\Tracker\Visitor; use Piwik\Tracker\Action; @@ -16,10 +17,20 @@ use Piwik\Tracker\Action; class BrowserVersion extends Base { protected $columnName = 'config_browser_version'; + protected $columnType = 'VARCHAR(20) NOT NULL'; + + protected function configureSegments() + { + $segment = new Segment(); + $segment->setSegment('browserVersion'); + $segment->setName('UserSettings_ColumnBrowserVersion'); + $segment->setAcceptedValues('1.0, 8.0, etc.'); + $this->addSegment($segment); + } public function getName() { - return Piwik::translate('DevicesDetection_BrowserVersions'); + return Piwik::translate('UserSettings_ColumnBrowserVersion'); } /** diff --git a/plugins/DevicesDetection/Columns/Os.php b/plugins/DevicesDetection/Columns/Os.php index 599edb3285..62d1a5cb71 100644 --- a/plugins/DevicesDetection/Columns/Os.php +++ b/plugins/DevicesDetection/Columns/Os.php @@ -9,6 +9,7 @@ namespace Piwik\Plugins\DevicesDetection\Columns; use Piwik\Piwik; +use Piwik\Plugins\DevicesDetection\Segment; use Piwik\Tracker\Request; use Piwik\Tracker\Settings; use Piwik\Tracker\Visitor; @@ -17,10 +18,20 @@ use Piwik\Tracker\Action; class Os extends Base { protected $columnName = 'config_os'; + protected $columnType = 'CHAR(3) NOT NULL'; + + protected function configureSegments() + { + $segment = new Segment(); + $segment->setSegment('operatingSystemCode'); + $segment->setName('UserSettings_ColumnOperatingSystem'); + $segment->setAcceptedValues('WXP, WI7, MAC, LIN, AND, IPD, etc.'); + $this->addSegment($segment); + } public function getName() { - return Piwik::translate('DevicesDetection_OperatingSystemFamilies'); + return Piwik::translate('UserSettings_OperatingSystemFamily'); } /** |