Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsgiehl <stefan@piwik.org>2015-01-20 01:18:35 +0300
committersgiehl <stefan@piwik.org>2015-01-20 01:18:35 +0300
commit91dc1d284067f9707293d76d1591163e26df7c10 (patch)
tree68194dd220f48cfcf1fc8084e3ced6089cabe7de /core/ViewDataTable
parent38cb7c094d9e3ff4c7f24e88ccbe3563d842e6c9 (diff)
improved method name
Diffstat (limited to 'core/ViewDataTable')
-rw-r--r--core/ViewDataTable/Factory.php14
1 files changed, 11 insertions, 3 deletions
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;