diff options
author | Fabian Becker <fabian.becker@uni-tuebingen.de> | 2013-07-18 13:45:02 +0400 |
---|---|---|
committer | Fabian Becker <fabian.becker@uni-tuebingen.de> | 2013-07-18 13:45:02 +0400 |
commit | 03b4953f008c1063e6d7166143ba844e8c6e89cc (patch) | |
tree | 7b9f0fef13d75417c551f813c98dba1a22f2fff3 /plugins/DBStats | |
parent | 9b2c0a7a450fff3b634f8119c8003ae1d20b97d0 (diff) |
Refactor class Piwik_Common to \Piwik\Core\Common
Notice that auto refactoring has created a nested namespace. Not sure this is what we want - so we might have to edit those nested namespaces afterwards (I think they don't look so good)
Diffstat (limited to 'plugins/DBStats')
-rw-r--r-- | plugins/DBStats/API.php | 8 | ||||
-rwxr-xr-x | plugins/DBStats/MySQLMetadataProvider.php | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/plugins/DBStats/API.php b/plugins/DBStats/API.php index 8e99fc8fec..0610b4573d 100644 --- a/plugins/DBStats/API.php +++ b/plugins/DBStats/API.php @@ -9,7 +9,7 @@ * @package Piwik_DBStats */ use Piwik\Core\Piwik; -use Piwik\Core\Piwik_Common; +use Piwik\Core\Common; /** * @see plugins/DBStats/MySQLMetadataProvider.php @@ -273,19 +273,19 @@ class Piwik_DBStats_API /** Returns true if $name is the name of a numeric archive table, false if otherwise. */ private function isNumericArchiveTable($name) { - return strpos($name, Piwik_Common::prefixTable('archive_numeric_')) === 0; + return strpos($name, Common::prefixTable('archive_numeric_')) === 0; } /** Returns true if $name is the name of a blob archive table, false if otherwise. */ private function isBlobArchiveTable($name) { - return strpos($name, Piwik_Common::prefixTable('archive_blob_')) === 0; + return strpos($name, Common::prefixTable('archive_blob_')) === 0; } /** Returns true if $name is the name of a log table, false if otherwise. */ private function isTrackerTable($name) { - return strpos($name, Piwik_Common::prefixTable('log_')) === 0; + return strpos($name, Common::prefixTable('log_')) === 0; } /** diff --git a/plugins/DBStats/MySQLMetadataProvider.php b/plugins/DBStats/MySQLMetadataProvider.php index 90185312cb..75ca12e6ac 100755 --- a/plugins/DBStats/MySQLMetadataProvider.php +++ b/plugins/DBStats/MySQLMetadataProvider.php @@ -9,7 +9,7 @@ * @package Piwik_DBStats */ use Piwik\Core\Piwik; -use Piwik\Core\Piwik_Common; +use Piwik\Core\Common; /** * Utility class that provides general information about databases, including the size of @@ -78,7 +78,7 @@ class Piwik_DBStats_MySQLMetadataProvider */ public function getTableStatus($table) { - $prefixed = Piwik_Common::prefixTable($table); + $prefixed = Common::prefixTable($table); // if we've already gotten every table status, don't issue an uneeded query if (!is_null($this->tableStatuses) && isset($this->tableStatuses[$prefixed])) { @@ -130,7 +130,7 @@ class Piwik_DBStats_MySQLMetadataProvider */ public function getAllLogTableStatus() { - $regex = "/^" . Piwik_Common::prefixTable('log_') . "(?!profiling)/"; + $regex = "/^" . Common::prefixTable('log_') . "(?!profiling)/"; return $this->getAllTablesStatus($regex); } @@ -141,7 +141,7 @@ class Piwik_DBStats_MySQLMetadataProvider */ public function getAllNumericArchiveStatus() { - $regex = "/^" . Piwik_Common::prefixTable('archive_numeric') . "_/"; + $regex = "/^" . Common::prefixTable('archive_numeric') . "_/"; return $this->getAllTablesStatus($regex); } @@ -152,7 +152,7 @@ class Piwik_DBStats_MySQLMetadataProvider */ public function getAllBlobArchiveStatus() { - $regex = "/^" . Piwik_Common::prefixTable('archive_blob') . "_/"; + $regex = "/^" . Common::prefixTable('archive_blob') . "_/"; return $this->getAllTablesStatus($regex); } @@ -163,7 +163,7 @@ class Piwik_DBStats_MySQLMetadataProvider */ public function getAllAdminTableStatus() { - $regex = "/^" . Piwik_Common::prefixTable('') . "(?!archive_|(?:log_(?!profiling)))/"; + $regex = "/^" . Common::prefixTable('') . "(?!archive_|(?:log_(?!profiling)))/"; return $this->getAllTablesStatus($regex); } |