diff options
author | diosmosis <benaka@piwik.pro> | 2014-11-08 02:46:58 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2014-11-08 03:00:47 +0300 |
commit | 68d77438edb1a492c9ef7943c16ac9874175b362 (patch) | |
tree | f5904b96eeefa21836b4033df180f5cdace544fb /plugins/VisitorInterest/API.php | |
parent | 949adebcc57524bd49c61eba6fda670c46654630 (diff) |
Converted most other processed metric calculation to use ProcessedMetric class.
Diffstat (limited to 'plugins/VisitorInterest/API.php')
-rw-r--r-- | plugins/VisitorInterest/API.php | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/plugins/VisitorInterest/API.php b/plugins/VisitorInterest/API.php index 44df111588..33f6d97b58 100644 --- a/plugins/VisitorInterest/API.php +++ b/plugins/VisitorInterest/API.php @@ -87,28 +87,6 @@ class API extends \Piwik\Plugin\API $dataTable->queueFilter('BeautifyRangeLabels', array( Piwik::translate('General_OneVisit'), Piwik::translate('General_NVisits'))); - // add visit percent column - self::addVisitsPercentColumn($dataTable); - return $dataTable; } - - /** - * Utility function that adds a visit percent column to a data table, - * regardless of whether the data table is an data table array or just - * a data table. - * - * @param DataTable $dataTable The data table to modify. - */ - private static function addVisitsPercentColumn($dataTable) - { - if ($dataTable instanceof DataTable\Map) { - foreach ($dataTable->getDataTables() as $table) { - self::addVisitsPercentColumn($table); - } - } else { - $totalVisits = array_sum($dataTable->getColumn(Metrics::INDEX_NB_VISITS)); - $dataTable->queueFilter('ColumnCallbackAddColumnPercentage', array('nb_visits_percentage', 'nb_visits', $totalVisits)); - } - } } |