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 <thomas.steur@googlemail.com>2014-09-03 19:35:50 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-09-03 19:35:50 +0400
commit71c76ffd4435344024c3a9ef332daab8f908572f (patch)
tree076b4638a76ed936c87deb8dde8bac6eae0eb683 /plugins/Contents/Archiver.php
parent9b1d0b1c50455fc6b7928718d71c052957a00598 (diff)
refs #4996 updated spec to better describe how it will work. While writing this I noticed a few things that need to be changed and that do not work, also many possible new features for V2. Already updated a few things but will need to adjust more things before writing tests
Diffstat (limited to 'plugins/Contents/Archiver.php')
-rw-r--r--plugins/Contents/Archiver.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/Contents/Archiver.php b/plugins/Contents/Archiver.php
index c5888b29a8..debac613a9 100644
--- a/plugins/Contents/Archiver.php
+++ b/plugins/Contents/Archiver.php
@@ -21,6 +21,7 @@ class Archiver extends \Piwik\Plugin\Archiver
const CONTENTS_PIECE_NAME_RECORD_NAME = 'Contents_piece_name';
const CONTENTS_NAME_PIECE_RECORD_NAME = 'Contents_name_piece';
const CONTENT_TARGET_NOT_SET = 'Piwik_ContentTargetNotSet';
+ const CONTENT_PIECE_NOT_SET = 'Piwik_ContentPieceNotSet';
/**
* @var DataArray[]
@@ -248,6 +249,12 @@ class Archiver extends \Piwik\Plugin\Archiver
$mainDimension = $dimensions[0];
$mainLabel = $row[$mainDimension];
+ // content piece is optional
+ if ($mainDimension == 'contentPiece'
+ && empty($mainLabel)) {
+ $mainLabel = self::CONTENT_PIECE_NOT_SET;
+ }
+
$dataArray->sumMetricsImpressions($mainLabel, $row);
$this->rememberMetadataForRow($row, $mainLabel);