diff options
author | sgiehl <stefan@piwik.org> | 2015-01-20 01:18:35 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2015-01-20 01:18:35 +0300 |
commit | 91dc1d284067f9707293d76d1591163e26df7c10 (patch) | |
tree | 68194dd220f48cfcf1fc8084e3ced6089cabe7de | |
parent | 38cb7c094d9e3ff4c7f24e88ccbe3563d842e6c9 (diff) |
improved method name
-rw-r--r-- | core/Plugin/Report.php | 4 | ||||
-rw-r--r-- | core/ViewDataTable/Factory.php | 14 | ||||
-rw-r--r-- | plugins/Live/Reports/GetLastVisitsDetails.php | 2 |
3 files changed, 14 insertions, 6 deletions
diff --git a/core/Plugin/Report.php b/core/Plugin/Report.php index a9bb94667e..3608a5facb 100644 --- a/core/Plugin/Report.php +++ b/core/Plugin/Report.php @@ -271,11 +271,11 @@ class Report } /** - * Returns if the default viewDataTable type is fixed. e.g. the type won't be changeable through config or url params. + * Returns if the default viewDataTable type should always be used. e.g. the type won't be changeable through config or url params. * Defaults to false * @return bool */ - public function isDefaultTypeFixed() + public function alwaysUseDefaultViewDataTable () { return false; } diff --git a/core/ViewDataTable/Factory.php b/core/ViewDataTable/Factory.php index b4349b872d..01d7113498 100644 --- a/core/ViewDataTable/Factory.php +++ b/core/ViewDataTable/Factory.php @@ -97,7 +97,7 @@ class Factory $report = self::getReport($apiAction); - $defaultViewType = self::getDefaultViewTypeForReport($report); + $defaultViewType = self::getDefaultViewTypeForReport($report, $apiAction); $isWidget = Common::getRequestVar('widget', '0', 'string'); @@ -172,8 +172,13 @@ class Factory /** * Returns the default viewDataTable ID to use when determining which visualization to use. + * + * @param Report $report + * @param string $apiAction + * + * @return bool|string */ - private static function getDefaultViewTypeForReport($report) + private static function getDefaultViewTypeForReport($report, $apiAction) { if (!empty($report) && $report->isEnabled()) { return $report->getDefaultTypeViewDataTable(); @@ -185,11 +190,14 @@ class Factory /** * Returns if the default viewDataTable ID to use is fixed. + * + * @param Report $report + * @return bool */ private static function isDefaultViewTypeForReportFixed($report) { if (!empty($report) && $report->isEnabled()) { - return $report->isDefaultTypeFixed(); + return $report->alwaysUseDefaultViewDataTable(); } return false; diff --git a/plugins/Live/Reports/GetLastVisitsDetails.php b/plugins/Live/Reports/GetLastVisitsDetails.php index bb88e712f5..7d5318b588 100644 --- a/plugins/Live/Reports/GetLastVisitsDetails.php +++ b/plugins/Live/Reports/GetLastVisitsDetails.php @@ -27,7 +27,7 @@ class GetLastVisitsDetails extends Base return VisitorLog::ID; } - public function isDefaultTypeFixed() + public function alwaysUseDefaultViewDataTable() { return true; } |