Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2016-10-03 08:17:37 +0300
committerMatthieu Aubry <mattab@users.noreply.github.com>2016-10-03 08:17:37 +0300
commitd475dd18f118421c21050b5a6b8f58a2464b1f18 (patch)
treef17173566d286a75b1546b9e86b58c231c014c39
parentecb3d2e833f4c667875ca0249fa83b212ccf62a0 (diff)
Visitor IP Segment is defined twice (#10621)
-rw-r--r--core/Plugin/Manager.php2
-rw-r--r--plugins/API/SegmentMetadata.php43
m---------plugins/CustomDimensions0
-rw-r--r--tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml32
4 files changed, 2 insertions, 75 deletions
diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php
index 264e85cf4f..c38773380d 100644
--- a/core/Plugin/Manager.php
+++ b/core/Plugin/Manager.php
@@ -817,7 +817,7 @@ class Manager
*/
public function getLoadedPlugin($name)
{
- if (!isset($this->loadedPlugins[$name])) {
+ if (!isset($this->loadedPlugins[$name]) || is_null($this->loadedPlugins[$name])) {
throw new \Exception("The plugin '$name' has not been loaded.");
}
return $this->loadedPlugins[$name];
diff --git a/plugins/API/SegmentMetadata.php b/plugins/API/SegmentMetadata.php
index fbe73a774f..c708702b45 100644
--- a/plugins/API/SegmentMetadata.php
+++ b/plugins/API/SegmentMetadata.php
@@ -27,47 +27,6 @@ class SegmentMetadata
}
}
- $segments[] = array(
- 'type' => 'dimension',
- 'category' => Piwik::translate('General_Visit'),
- 'name' => 'General_UserId',
- 'segment' => 'userId',
- 'acceptedValues' => 'any non empty unique string identifying the user (such as an email address or a username).',
- 'sqlSegment' => 'log_visit.user_id',
- 'permission' => $isAuthenticatedWithViewAccess,
- );
-
- $segments[] = array(
- 'type' => 'dimension',
- 'category' => Piwik::translate('General_Visit'),
- 'name' => 'General_VisitorID',
- 'segment' => 'visitorId',
- 'acceptedValues' => '34c31e04394bdc63 - any 16 Hexadecimal chars ID, which can be fetched using the Tracking API function getVisitorId()',
- 'sqlSegment' => 'log_visit.idvisitor',
- 'sqlFilterValue' => array('Piwik\Common', 'convertVisitorIdToBin'),
- 'permission' => $isAuthenticatedWithViewAccess,
- );
-
- $segments[] = array(
- 'type' => 'dimension',
- 'category' => Piwik::translate('General_Visit'),
- 'name' => Piwik::translate('General_Visit') . " ID",
- 'segment' => 'visitId',
- 'acceptedValues' => 'Any integer.',
- 'sqlSegment' => 'log_visit.idvisit',
- 'permission' => $isAuthenticatedWithViewAccess,
- );
-
- $segments[] = array(
- 'type' => 'metric',
- 'category' => Piwik::translate('General_Visit'),
- 'name' => 'General_VisitorIP',
- 'segment' => 'visitIp',
- 'acceptedValues' => '13.54.122.1. </code>Select IP ranges with notation: <code>visitIp>13.54.122.0;visitIp<13.54.122.255',
- 'sqlSegment' => 'log_visit.location_ip',
- 'sqlFilterValue' => array('Piwik\Network\IPUtils', 'stringToBinaryIP'),
- 'permission' => $isAuthenticatedWithViewAccess,
- );
foreach ($segments as &$segment) {
$segment['name'] = Piwik::translate($segment['name']);
@@ -120,4 +79,4 @@ class SegmentMetadata
return $compare;
}
-} \ No newline at end of file
+}
diff --git a/plugins/CustomDimensions b/plugins/CustomDimensions
-Subproject 096c2707dd0ed9818bbfd7bed4774f54d681083
+Subproject a6bdbaef0040f00e34d344231da777304883026
diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml
index 4e256b9e19..70ceefeae0 100644
--- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml
+++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml
@@ -59,14 +59,6 @@
<permission>1</permission>
</row>
<row>
- <type>metric</type>
- <category>Visit</category>
- <name>Visitor IP</name>
- <segment>visitIp</segment>
- <acceptedValues>13.54.122.1. &lt;/code&gt;Select IP ranges with notation: &lt;code&gt;visitIp&gt;13.54.122.0;visitIp&lt;13.54.122.255</acceptedValues>
- <permission>1</permission>
- </row>
- <row>
<type>dimension</type>
<category>Visit Location</category>
<name>City</name>
@@ -197,14 +189,6 @@
<row>
<type>dimension</type>
<category>Visit</category>
- <name>User ID</name>
- <segment>userId</segment>
- <acceptedValues>any non empty unique string identifying the user (such as an email address or a username).</acceptedValues>
- <permission>1</permission>
- </row>
- <row>
- <type>dimension</type>
- <category>Visit</category>
<name>Visit Ecommerce status at the end of the visit</name>
<segment>visitEcommerceStatus</segment>
<acceptedValues>none, ordered, abandonedCart, orderedThenAbandonedCart. For example, to select all visits that have made an Ecommerce order, the API request would contain &quot;&amp;segment=visitEcommerceStatus==ordered,visitEcommerceStatus==orderedThenAbandonedCart&quot;</acceptedValues>
@@ -220,14 +204,6 @@
<row>
<type>dimension</type>
<category>Visit</category>
- <name>Visit ID</name>
- <segment>visitId</segment>
- <acceptedValues>Any integer.</acceptedValues>
- <permission>1</permission>
- </row>
- <row>
- <type>dimension</type>
- <category>Visit</category>
<name>Visit converted a specific Goal Id</name>
<segment>visitConvertedGoalId</segment>
<acceptedValues>1, 2, 3, etc.</acceptedValues>
@@ -256,14 +232,6 @@
</row>
<row>
<type>dimension</type>
- <category>Visit</category>
- <name>Visitor ID</name>
- <segment>visitorId</segment>
- <acceptedValues>34c31e04394bdc63 - any 16 Hexadecimal chars ID, which can be fetched using the Tracking API function getVisitorId()</acceptedValues>
- <permission>1</permission>
- </row>
- <row>
- <type>dimension</type>
<category>Referrers</category>
<name>Keyword</name>
<segment>referrerKeyword</segment>