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:
-rw-r--r--core/Plugin/Report.php4
-rw-r--r--core/ViewDataTable/Factory.php14
-rw-r--r--plugins/Live/Reports/GetLastVisitsDetails.php2
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;
}