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:
authormattab <matthieu.aubry@gmail.com>2013-07-23 11:52:15 +0400
committermattab <matthieu.aubry@gmail.com>2013-07-23 11:52:15 +0400
commit5104d94f3b2250f766b9c520e2da8da9b4cab2e9 (patch)
tree5f30daf7bc14373fb1bbd0504ce11a771dafc02f /core/RankingQuery.php
parentae4b1f4e38077b174e4df5b7d4513d63fe026a24 (diff)
Refs #4059 Work in progress: Conversion to use Namespaces of dozen more classes
Removed many Piwik_ functions, in Piwik 2 it is best practise to use the methods calls instead Todo: finish converting core/ classes + convert plugins/ classes to use \Piwik\Plugin namespace + fix build + Merge master
Diffstat (limited to 'core/RankingQuery.php')
-rw-r--r--core/RankingQuery.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/core/RankingQuery.php b/core/RankingQuery.php
index 147f58e1bf..e72d76f193 100644
--- a/core/RankingQuery.php
+++ b/core/RankingQuery.php
@@ -9,6 +9,10 @@
* @package Piwik
*/
+namespace Piwik;
+
+use Exception;
+
/**
* The ranking query class wraps an arbitrary SQL query with more SQL that limits
* the number of results while grouping the rest to "Others" and allows for some
@@ -18,7 +22,7 @@
* The general use case looks like this:
*
* // limit to 500 rows + "Others"
- * $rankingQuery = new Piwik_RankingQuery(500);
+ * $rankingQuery = new RankingQuery(500);
*
* // idaction_url will be "Others" in the row that contains the aggregated rest
* $rankingQuery->addLabelColumn('idaction_url');
@@ -38,7 +42,7 @@
*
* @package Piwik
*/
-class Piwik_RankingQuery
+class RankingQuery
{
/**
@@ -205,7 +209,7 @@ class Piwik_RankingQuery
public function execute($innerQuery, $bind = array())
{
$query = $this->generateQuery($innerQuery);
- $data = Piwik_FetchAll($query, $bind);
+ $data = Db::fetchAll($query, $bind);
if ($this->columnToMarkExcludedRows !== false) {
// split the result into the regular result and the rows with special treatment
@@ -285,7 +289,6 @@ class Piwik_RankingQuery
} else {
$additionalColumnsAggregatedString .= ', `' . $additionalColumn . '`';
}
-
}
// initialize the counters
@@ -359,5 +362,4 @@ class Piwik_RankingQuery
END
";
}
-
}