update Piwik to version 2.16 (fixes #91)

This commit is contained in:
oliver 2016-04-10 18:55:57 +02:00
commit d885a4baa9
5833 changed files with 418860 additions and 226988 deletions

View file

@ -1,6 +1,6 @@
<?php
/**
* Piwik - Open source web analytics
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
@ -13,20 +13,23 @@ use Piwik\Metrics;
class Archiver extends \Piwik\Plugin\Archiver
{
const BROWSER_SEPARATOR = ';';
const DEVICE_TYPE_RECORD_NAME = 'DevicesDetection_types';
const DEVICE_BRAND_RECORD_NAME = 'DevicesDetection_brands';
const DEVICE_MODEL_RECORD_NAME = 'DevicesDetection_models';
const OS_RECORD_NAME = 'DevicesDetection_os';
const OS_VERSION_RECORD_NAME = 'DevicesDetection_osVersions';
const BROWSER_RECORD_NAME = 'DevicesDetection_browsers';
const BROWSER_ENGINE_RECORD_NAME = 'DevicesDetection_browserEngines';
const BROWSER_VERSION_RECORD_NAME = 'DevicesDetection_browserVersions';
const DEVICE_TYPE_FIELD = "config_device_type";
const DEVICE_BRAND_FIELD = "config_device_brand";
const DEVICE_MODEL_FIELD = "config_device_model";
const DEVICE_MODEL_FIELD = "CONCAT(log_visit.config_device_brand, ';', log_visit.config_device_model)";
const OS_FIELD = "config_os";
const OS_VERSION_FIELD = "CONCAT(log_visit.config_os, ';', log_visit.config_os_version)";
const OS_VERSION_FIELD = "CONCAT(log_visit.config_os, ';', COALESCE(log_visit.config_os_version, ''))";
const BROWSER_FIELD = "config_browser_name";
const BROWSER_ENGINE_FIELD = "config_browser_engine";
const BROWSER_VERSION_DIMENSION = "CONCAT(log_visit.config_browser_name, ';', log_visit.config_browser_version)";
public function aggregateDayReport()
@ -37,6 +40,7 @@ class Archiver extends \Piwik\Plugin\Archiver
$this->aggregateByLabel(self::OS_FIELD, self::OS_RECORD_NAME);
$this->aggregateByLabel(self::OS_VERSION_FIELD, self::OS_VERSION_RECORD_NAME);
$this->aggregateByLabel(self::BROWSER_FIELD, self::BROWSER_RECORD_NAME);
$this->aggregateByLabel(self::BROWSER_ENGINE_FIELD, self::BROWSER_ENGINE_RECORD_NAME);
$this->aggregateByLabel(self::BROWSER_VERSION_DIMENSION, self::BROWSER_VERSION_RECORD_NAME);
}
@ -49,11 +53,21 @@ class Archiver extends \Piwik\Plugin\Archiver
self::OS_RECORD_NAME,
self::OS_VERSION_RECORD_NAME,
self::BROWSER_RECORD_NAME,
self::BROWSER_ENGINE_RECORD_NAME,
self::BROWSER_VERSION_RECORD_NAME
);
$columnsAggregationOperation = null;
foreach ($dataTablesToSum as $dt) {
$this->getProcessor()->aggregateDataTableRecords(
$dt, $this->maximumRows, $this->maximumRows, $columnToSort = "nb_visits");
$dt,
$this->maximumRows,
$this->maximumRows,
$columnToSort = 'nb_visits',
$columnsAggregationOperation,
$columnsToRenameAfterAggregation = null,
$countRowsRecursive = array());
}
}