diff options
Diffstat (limited to 'core/RankingQuery.php')
-rw-r--r-- | core/RankingQuery.php | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/core/RankingQuery.php b/core/RankingQuery.php index 8de988b7df..a743f898d3 100644 --- a/core/RankingQuery.php +++ b/core/RankingQuery.php @@ -80,6 +80,11 @@ class Piwik_RankingQuery */ private $partitionColumnValues = array(); + /** + * The value to use in the label of the 'Others' row. + * @var string + */ + private $othersLabelValue = 'Others'; /** * The constructor. @@ -104,6 +109,16 @@ class Piwik_RankingQuery } /** + * Set the value to use for the label in the 'Others' row. + * + * @param $value string + */ + public function setOthersLabel($value) + { + $this->othersLabelValue = $value; + } + + /** * Add a label column. * Labels are the columns that are replaced with "Others" after the limit. * @@ -273,7 +288,7 @@ class Piwik_RankingQuery { $labelColumnsOthersSwitch[] = " CASE - WHEN counter = $limit THEN \"Others\" + WHEN counter = $limit THEN \"{$this->othersLabelValue}\" ELSE `$column` END AS `$column` "; @@ -380,4 +395,4 @@ class Piwik_RankingQuery "; } -}
\ No newline at end of file +} |