Skip to content

Commit

Permalink
refs #4633 actually it is not a good idea to generate a segment for s…
Browse files Browse the repository at this point in the history
…ubtables since they can belong to different repots and need different segments
  • Loading branch information
tsteur committed Feb 15, 2015
1 parent 03551a1 commit c20303e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions core/DataTable/Filter/AddSegmentByLabel.php
Expand Up @@ -73,8 +73,6 @@ public function filter($table)
if (!empty($label)) {
$row->setMetadata('segment', $segment . '==' . urlencode($label));
}

$this->filterSubTable($row);
}
} else if (!empty($this->delimiter)) {
$numSegments = count($this->segments);
Expand Down
2 changes: 0 additions & 2 deletions core/DataTable/Filter/AddSegmentByLabelMapping.php
Expand Up @@ -58,8 +58,6 @@ public function filter($table)
$label = $this->mapping[$label];
$row->setMetadata('segment', $this->segment . '==' . urlencode($label));
}

$this->filterSubTable($row);
}
}
}
4 changes: 1 addition & 3 deletions core/DataTable/Filter/AddSegmentBySegmentValue.php
Expand Up @@ -63,7 +63,7 @@ public function filter($table)
}

/** @var \Piwik\Plugin\Segment $segment */
$segment = array_shift($segments);
$segment = reset($segments);
$segmentName = $segment->getSegment();

foreach ($table->getRows() as $row) {
Expand All @@ -73,8 +73,6 @@ public function filter($table)
if ($value !== false && $filter === false) {
$row->setMetadata('segment', sprintf('%s==%s', $segmentName, urlencode($value)));
}

$this->filterSubTable($row);
}
}
}

0 comments on commit c20303e

Please sign in to comment.