diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-04-22 01:00:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-22 01:00:13 +0300 |
commit | f1c180a19fb302b904d54070c0915164fcb4f2c3 (patch) | |
tree | 62ac81a4e61489b97bb6ef25aaf1c381db2a9f43 /plugins | |
parent | b916403a9e792b1e01cb3fd97ee49c8ef40c219d (diff) |
makes DBStats.getArchiveTableYear private (#15839)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/DBStats/API.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/DBStats/API.php b/plugins/DBStats/API.php index 42a7fe4d21..e84e4e378f 100644 --- a/plugins/DBStats/API.php +++ b/plugins/DBStats/API.php @@ -139,7 +139,7 @@ class API extends \Piwik\Plugin\API $dataTable = $this->getMetricDataSummary(); - $dataTable->filter('GroupBy', array('label', __NAMESPACE__ . '\API::getArchiveTableYear')); + $dataTable->filter('GroupBy', array('label', function($tableName) { return $this->getArchiveTableYear($tableName); })); return $dataTable; } @@ -168,7 +168,7 @@ class API extends \Piwik\Plugin\API $dataTable = $this->getReportDataSummary(); - $dataTable->filter('GroupBy', array('label', __NAMESPACE__ . '\API::getArchiveTableYear')); + $dataTable->filter('GroupBy', array('label', function($tableName) { return $this->getArchiveTableYear($tableName); })); return $dataTable; } @@ -263,9 +263,8 @@ class API extends \Piwik\Plugin\API * @param string $tableName * * @return string the year - * @ignore */ - public static function getArchiveTableYear($tableName) + private function getArchiveTableYear($tableName) { if (preg_match("/archive_(?:numeric|blob)_([0-9]+)_/", $tableName, $matches) === 0) { return ''; |