diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2013-11-18 07:02:19 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2013-11-18 07:02:19 +0400 |
commit | 9060f0180cb935efd1925942d3a8ce1cf309459a (patch) | |
tree | b474d8758f3b45063e4bd430f5daa028b369c879 /plugins/DBStats/Controller.php | |
parent | 4658d92891093982d979e7ec8343ee4ccc510a38 (diff) |
getting rid of the fetch parameter
Diffstat (limited to 'plugins/DBStats/Controller.php')
-rw-r--r-- | plugins/DBStats/Controller.php | 57 |
1 files changed, 19 insertions, 38 deletions
diff --git a/plugins/DBStats/Controller.php b/plugins/DBStats/Controller.php index 2cf1dcc0d7..22e95c23d6 100644 --- a/plugins/DBStats/Controller.php +++ b/plugins/DBStats/Controller.php @@ -44,91 +44,78 @@ class Controller extends \Piwik\Plugin\ControllerAdmin $view->userCount = MetricsFormatter::getPrettyNumber($userCount); $view->totalSpaceUsed = MetricsFormatter::getPrettySizeFromBytes($totalSpaceUsed); - echo $view->render(); + return $view->render(); } /** * Shows a datatable that displays how much space the tracker tables, numeric * archive tables, report tables and other tables take up in the MySQL database. * - * @param bool $fetch If true, the rendered HTML datatable is returned, otherwise, - * it is echoed. * @return string */ - public function getDatabaseUsageSummary($fetch = false) + public function getDatabaseUsageSummary() { Piwik::checkUserIsSuperUser(); - return $this->renderReport(__FUNCTION__, $fetch); + return $this->renderReport(__FUNCTION__); } /** * Shows a datatable that displays the amount of space each individual log table * takes up in the MySQL database. - * - * @param bool $fetch If true, the rendered HTML datatable is returned, otherwise, - * it is echoed. * @return string|void */ - public function getTrackerDataSummary($fetch = false) + public function getTrackerDataSummary() { Piwik::checkUserIsSuperUser(); - return $this->renderReport(__FUNCTION__, $fetch); + return $this->renderReport(__FUNCTION__); } /** * Shows a datatable that displays the amount of space each numeric archive table * takes up in the MySQL database. * - * @param bool $fetch If true, the rendered HTML datatable is returned, otherwise, - * it is echoed. * @return string|void */ - public function getMetricDataSummary($fetch = false) + public function getMetricDataSummary() { Piwik::checkUserIsSuperUser(); - return $this->renderReport(__FUNCTION__, $fetch); + return $this->renderReport(__FUNCTION__); } /** * Shows a datatable that displays the amount of space each numeric archive table * takes up in the MySQL database, for each year of numeric data. * - * @param bool $fetch If true, the rendered HTML datatable is returned, otherwise, - * it is echoed. * @return string|void */ - public function getMetricDataSummaryByYear($fetch = false) + public function getMetricDataSummaryByYear() { Piwik::checkUserIsSuperUser(); - return $this->renderReport(__FUNCTION__, $fetch); + return $this->renderReport(__FUNCTION__); } /** * Shows a datatable that displays the amount of space each blob archive table * takes up in the MySQL database. * - * @param bool $fetch If true, the rendered HTML datatable is returned, otherwise, - * it is echoed. * @return string|void */ - public function getReportDataSummary($fetch = false) + public function getReportDataSummary() { Piwik::checkUserIsSuperUser(); - return $this->renderReport(__FUNCTION__, $fetch); + return $this->renderReport(__FUNCTION__); } /** * Shows a datatable that displays the amount of space each blob archive table * takes up in the MySQL database, for each year of blob data. * - * @param bool $fetch If true, the rendered HTML datatable is returned, otherwise, - * it is echoed. * @return string|void */ - public function getReportDataSummaryByYear($fetch = false) + public function getReportDataSummaryByYear() { Piwik::checkUserIsSuperUser(); - return $this->renderReport(__FUNCTION__, $fetch); + return $this->renderReport(__FUNCTION__); } /** @@ -137,14 +124,12 @@ class Controller extends \Piwik\Plugin\ControllerAdmin * * Goal reports and reports of the format: .*_[0-9]+ are grouped together. * - * @param bool $fetch If true, the rendered HTML datatable is returned, otherwise, - * it is echoed. * @return string|void */ - public function getIndividualReportsSummary($fetch = false) + public function getIndividualReportsSummary() { Piwik::checkUserIsSuperUser(); - return $this->renderReport(__FUNCTION__, $fetch); + return $this->renderReport(__FUNCTION__); } /** @@ -153,14 +138,12 @@ class Controller extends \Piwik\Plugin\ControllerAdmin * * Goal metrics, metrics of the format .*_[0-9]+ and 'done...' metrics are grouped together. * - * @param bool $fetch If true, the rendered HTML datatable is returned, otherwise, - * it is echoed. * @return string|void */ - public function getIndividualMetricsSummary($fetch = false) + public function getIndividualMetricsSummary() { Piwik::checkUserIsSuperUser(); - return $this->renderReport(__FUNCTION__, $fetch); + return $this->renderReport(__FUNCTION__); } /** @@ -170,13 +153,11 @@ class Controller extends \Piwik\Plugin\ControllerAdmin * An 'admin' table is a table that is not central to analytics functionality. * So any table that isn't an archive table or a log table is an 'admin' table. * - * @param bool $fetch If true, the rendered HTML datatable is returned, otherwise, - * it is echoed. * @return string|void */ - public function getAdminDataSummary($fetch = false) + public function getAdminDataSummary() { Piwik::checkUserIsSuperUser(); - return $this->renderReport(__FUNCTION__, $fetch); + return $this->renderReport(__FUNCTION__); } } |