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:
authormattpiwik <matthieu.aubry@gmail.com>2011-09-27 11:20:45 +0400
committermattpiwik <matthieu.aubry@gmail.com>2011-09-27 11:20:45 +0400
commitc91c513e983e051648b69d9b545ade0ba60fd9f7 (patch)
treecfc3456035075694078b4e9a388079b9f3392124 /plugins/CustomVariables/API.php
parent88b0320bd73aa6afb86bc6f55a837306ca467556 (diff)
Fixes #2667
* Stop aggregating visits for Custom variables of scope "page" * still OK for scope "visit" since there is supposed to be one custom var value per custom variable name for a given visit * Now we always display the Actions columns so that these rows with no visit still show the number of Actions * cleaned up from custom var output report, removed some "price_viewed" column left out UI Change (future FAQ maybe...) * When there is a "Visits" column for the Custom Variable report with a value of "-" (hyphen) then it means this custom variable was used with scope=page. Fixes #2662 * Added integration tests testing getPageUrl with multiple periods and websites * fixed a bug when idSite=all or 1,2,3 git-svn-id: http://dev.piwik.org/svn/trunk@5235 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/CustomVariables/API.php')
-rw-r--r--plugins/CustomVariables/API.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/plugins/CustomVariables/API.php b/plugins/CustomVariables/API.php
index c879ef3c1a..8f425df320 100644
--- a/plugins/CustomVariables/API.php
+++ b/plugins/CustomVariables/API.php
@@ -77,15 +77,24 @@ class Piwik_CustomVariables_API
/**
* @return Piwik_DataTable
*/
- public function getCustomVariablesValuesFromNameId($idSite, $period, $date, $idSubtable, $segment = false)
+ public function getCustomVariablesValuesFromNameId($idSite, $period, $date, $idSubtable, $segment = false, $_leavePriceViewedColumn = false)
{
$dataTable = $this->getDataTable($idSite, $period, $date, $segment, $expanded = false, $idSubtable);
- // Hack Ecommerce product price tracking to display correctly
- $dataTable->renameColumn('price_viewed', 'price');
- $dataTable->queueFilter('ColumnCallbackReplace',
- array('label', create_function('$label', 'return $label == Piwik_CustomVariables::LABEL_CUSTOM_VALUE_NOT_DEFINED ? "'. Piwik_Translate( 'General_NotDefined', Piwik_Translate('CustomVariables_ColumnCustomVariableValue')) .'" : $label;')));
+ if(!$_leavePriceViewedColumn)
+ {
+ $dataTable->deleteColumn('price_viewed');
+ }
+ else
+ {
+ // Hack Ecommerce product price tracking to display correctly
+ $dataTable->renameColumn('price_viewed', 'price');
+ }
+ $dataTable->queueFilter('ColumnCallbackReplace', array('label', create_function('$label', '
+ return $label == Piwik_CustomVariables::LABEL_CUSTOM_VALUE_NOT_DEFINED
+ ? "'. Piwik_Translate( 'General_NotDefined', Piwik_Translate('CustomVariables_ColumnCustomVariableValue')) .'"
+ : $label;')));
return $dataTable;
}
}