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:
authorbenakamoorthi <benaka.moorthi@gmail.com>2012-09-13 06:22:04 +0400
committerbenakamoorthi <benaka.moorthi@gmail.com>2012-09-13 06:22:04 +0400
commitdb1991fdd02f225b13cd725d7b8a20b2b1e2b32f (patch)
tree8399643b885e18fba8c819a462382434bf1b5b67 /core/RankingQuery.php
parentd09ab34dff6ba04afed225d17c431489c4097827 (diff)
Refs #3330, #766, #3227 use RankingQuery and truncate tables as they are created in Actions plugin. Also modified phpunit integration testing mechanism so all API calls are tested and outputted before a test case throws.
git-svn-id: http://dev.piwik.org/svn/trunk@6980 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/RankingQuery.php')
-rw-r--r--core/RankingQuery.php19
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
+}