diff options
author | Matthieu Aubry <matt@piwik.org> | 2015-12-04 04:51:01 +0300 |
---|---|---|
committer | Matthieu Aubry <matt@piwik.org> | 2015-12-04 04:51:01 +0300 |
commit | 55038d27f089c07eb28435f263b0e74be5285ff3 (patch) | |
tree | 2c2f0b6f0c11127e6906a3c7006dfaff8fdc0335 /plugins/SegmentEditor | |
parent | 9f489412ef05e60f327c4f1945be94c99fdc5a8c (diff) | |
parent | dc55de6d759bd436f3d920b164435b1c7796cdbf (diff) |
Merge pull request #9314 from piwik/action_type_segment
New segment: ActionType
Diffstat (limited to 'plugins/SegmentEditor')
-rw-r--r-- | plugins/SegmentEditor/SegmentSelectorControl.php | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/plugins/SegmentEditor/SegmentSelectorControl.php b/plugins/SegmentEditor/SegmentSelectorControl.php index b01018dbcf..72be071e5e 100644 --- a/plugins/SegmentEditor/SegmentSelectorControl.php +++ b/plugins/SegmentEditor/SegmentSelectorControl.php @@ -46,9 +46,10 @@ class SegmentSelectorControl extends UIControl $segments = APIMetadata::getInstance()->getSegmentsMetadata($this->idSite); + $visitTitle = Piwik::translate('General_Visit'); $segmentsByCategory = array(); foreach ($segments as $segment) { - if ($segment['category'] == Piwik::translate('General_Visit') + if ($segment['category'] == $visitTitle && ($segment['type'] == 'metric' && $segment['segment'] != 'visitIp') ) { $metricsLabel = Piwik::translate('General_Metrics'); @@ -57,7 +58,6 @@ class SegmentSelectorControl extends UIControl } $segmentsByCategory[$segment['category']][] = $segment; } - uksort($segmentsByCategory, array($this, 'sortSegmentCategories')); $this->createRealTimeSegmentsIsEnabled = Config::getInstance()->General['enable_create_realtime_segments']; $this->segmentsByCategory = $segmentsByCategory; @@ -100,15 +100,6 @@ class SegmentSelectorControl extends UIControl return (bool) $savedSegment['auto_archive']; } - public function sortSegmentCategories($a, $b) - { - // Custom Variables last - if ($a == Piwik::translate('CustomVariables_CustomVariables')) { - return 1; - } - return 0; - } - private function getTranslations() { $translationKeys = array( |