diff options
-rw-r--r-- | core/RankingQuery.php | 5 | ||||
-rw-r--r-- | plugins/Transitions/Transitions.php | 2 | ||||
-rw-r--r-- | tests/PHPUnit/Core/RankingQueryTest.php | 6 |
3 files changed, 7 insertions, 6 deletions
diff --git a/core/RankingQuery.php b/core/RankingQuery.php index a743f898d3..df4ca44cf9 100644 --- a/core/RankingQuery.php +++ b/core/RankingQuery.php @@ -288,7 +288,7 @@ class Piwik_RankingQuery { $labelColumnsOthersSwitch[] = " CASE - WHEN counter = $limit THEN \"{$this->othersLabelValue}\" + WHEN counter = $limit THEN '".$this->othersLabelValue."' ELSE `$column` END AS `$column` "; @@ -351,7 +351,8 @@ class Piwik_RankingQuery FROM ( $withCounter ) AS withCounter GROUP BY $groupBy "; - + + var_dump($groupOthers); return $groupOthers; } diff --git a/plugins/Transitions/Transitions.php b/plugins/Transitions/Transitions.php index 3b6db46876..2487522e82 100644 --- a/plugins/Transitions/Transitions.php +++ b/plugins/Transitions/Transitions.php @@ -84,7 +84,7 @@ class Piwik_Transitions extends Piwik_Plugin $rankingQuery->addLabelColumn('referrer_data'); $select = ' CASE referer_type - WHEN '.Piwik_Common::REFERER_TYPE_DIRECT_ENTRY.' THEN "" + WHEN '.Piwik_Common::REFERER_TYPE_DIRECT_ENTRY.' THEN \'\' WHEN '.Piwik_Common::REFERER_TYPE_SEARCH_ENGINE.' THEN referer_keyword WHEN '.Piwik_Common::REFERER_TYPE_WEBSITE.' THEN referer_url WHEN '.Piwik_Common::REFERER_TYPE_CAMPAIGN.' THEN CONCAT(referer_name, " ", referer_keyword) diff --git a/tests/PHPUnit/Core/RankingQueryTest.php b/tests/PHPUnit/Core/RankingQueryTest.php index 678f539320..60853bc5c9 100644 --- a/tests/PHPUnit/Core/RankingQueryTest.php +++ b/tests/PHPUnit/Core/RankingQueryTest.php @@ -27,7 +27,7 @@ class RankingQueryTest extends PHPUnit_Framework_TestCase $expected = " SELECT CASE - WHEN counter = 11 THEN \"Others\" + WHEN counter = 11 THEN 'Others' ELSE `label` END AS `label`, `column`, @@ -66,7 +66,7 @@ class RankingQueryTest extends PHPUnit_Framework_TestCase $expected = " SELECT CASE - WHEN counter = 21 THEN \"Others\" + WHEN counter = 21 THEN 'Others' ELSE `label` END AS `label`, `exclude_marker` @@ -104,7 +104,7 @@ class RankingQueryTest extends PHPUnit_Framework_TestCase $expected = " SELECT CASE - WHEN counter = 1001 THEN \"Others\" + WHEN counter = 1001 THEN 'Others' ELSE `label` END AS `label`, `partition` |