diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-07-21 12:01:35 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-07-21 12:01:36 +0400 |
commit | aca8ec33a85e0a70b818b6227145041717d7a69e (patch) | |
tree | 41377e3a9737d63222522ef93ecf8483f3faddfa /plugins/DBStats/MySQLMetadataProvider.php | |
parent | 0a63210e3eae7562af1a3dbee340eb1ee140db3d (diff) |
Refs #4059 Work in progress: Conversion to use Namespaces: Period*, Metrics, Segment, SegmentExpression, PluginsManager.
Removed some deprecated code.
Diffstat (limited to 'plugins/DBStats/MySQLMetadataProvider.php')
-rwxr-xr-x | plugins/DBStats/MySQLMetadataProvider.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/DBStats/MySQLMetadataProvider.php b/plugins/DBStats/MySQLMetadataProvider.php index 9641d2d788..c7701e6023 100755 --- a/plugins/DBStats/MySQLMetadataProvider.php +++ b/plugins/DBStats/MySQLMetadataProvider.php @@ -10,6 +10,8 @@ */ use Piwik\Piwik; use Piwik\Common; +use Piwik\Config; +use Piwik\DataTable; /** * Utility class that provides general information about databases, including the size of @@ -175,7 +177,7 @@ class Piwik_DBStats_MySQLMetadataProvider * * @param bool $forceCache false to use the cached result, true to run the queries again and * cache the result. - * @return Piwik_DataTable + * @return DataTable */ public function getRowCountsAndSizeByBlobName($forceCache = false) { @@ -194,7 +196,7 @@ class Piwik_DBStats_MySQLMetadataProvider * * @param bool $forceCache false to use the cached result, true to run the queries again and * cache the result. - * @return Piwik_DataTable + * @return DataTable */ public function getRowCountsAndSizeByMetricName($forceCache = false) { @@ -216,20 +218,20 @@ class Piwik_DBStats_MySQLMetadataProvider $cols = array_merge(array('row_count'), $otherDataTableColumns); - $dataTable = new Piwik_DataTable(); + $dataTable = new DataTable(); foreach ($statuses as $status) { $dataTableOptionName = $this->getCachedOptionName($status['Name'], 'byArchiveName'); // if option exists && !$forceCache, use the cached data, otherwise create the $cachedData = Piwik_GetOption($dataTableOptionName); if ($cachedData !== false && !$forceCache) { - $table = new Piwik_DataTable(); + $table = new DataTable(); $table->addRowsFromSerializedArray($cachedData); } else { // otherwise, create data table & cache it $sql = "SELECT name as 'label', COUNT(*) as 'row_count'$extraCols FROM {$status['Name']} GROUP BY name"; - $table = new Piwik_DataTable(); + $table = new DataTable(); $table->addRowsFromSimpleArray(Piwik_FetchAll($sql)); $reduceArchiveRowName = array($this, 'reduceArchiveRowName'); |