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:
authorThomas Steur <thomas.steur@googlemail.com>2014-06-18 09:13:42 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-06-18 09:14:14 +0400
commit79ec9d19368dbe49b4dbb34bb4762784962b3652 (patch)
tree0a2e6d648bd9767cb0c458ca4cc6f3f9adb3c503 /plugins/VisitorInterest
parentc6f7e78c537921bda68b51c993ada8a220f896c1 (diff)
this is epic... by rendering the reports this way we can remove a lot of duplicated, unneeded code while having backwards compatible urls, developers are still able to completely overwrite the reports controller action, we fix some issues where CoreHome.renderWidget was reported in dispatch events instead of the actual module/action -> fixes also some security issues and most saved params for reports work again. Hope it works as expected
Diffstat (limited to 'plugins/VisitorInterest')
-rw-r--r--plugins/VisitorInterest/Controller.php42
1 files changed, 4 insertions, 38 deletions
diff --git a/plugins/VisitorInterest/Controller.php b/plugins/VisitorInterest/Controller.php
index a2319d5c3e..753fce592b 100644
--- a/plugins/VisitorInterest/Controller.php
+++ b/plugins/VisitorInterest/Controller.php
@@ -10,49 +10,15 @@ namespace Piwik\Plugins\VisitorInterest;
use Piwik\View;
-/**
- */
class Controller extends \Piwik\Plugin\Controller
{
public function index()
{
$view = new View('@VisitorInterest/index');
- $view->dataTableNumberOfVisitsPerVisitDuration = $this->getNumberOfVisitsPerVisitDuration(true);
- $view->dataTableNumberOfVisitsPerPage = $this->getNumberOfVisitsPerPage(true);
- $view->dataTableNumberOfVisitsByVisitNum = $this->getNumberOfVisitsByVisitCount(true);
- $view->dataTableNumberOfVisitsByDaysSinceLast = $this->getNumberOfVisitsByDaysSinceLast(true);
+ $view->dataTableNumberOfVisitsPerVisitDuration = $this->renderReport('getNumberOfVisitsPerVisitDuration');
+ $view->dataTableNumberOfVisitsPerPage = $this->renderReport('getNumberOfVisitsPerPage');
+ $view->dataTableNumberOfVisitsByVisitNum = $this->renderReport('getNumberOfVisitsByVisitCount');
+ $view->dataTableNumberOfVisitsByDaysSinceLast = $this->renderReport('getNumberOfVisitsByDaysSinceLast');
return $view->render();
}
-
- public function getNumberOfVisitsPerVisitDuration()
- {
- return $this->renderReport(__FUNCTION__);
- }
-
- public function getNumberOfVisitsPerPage()
- {
- return $this->renderReport(__FUNCTION__);
- }
-
- /**
- * Returns a report that lists the count of visits for different ranges of
- * a visitor's visit number.
- *
- * @return string The rendered report or nothing if $fetch is set to false.
- */
- public function getNumberOfVisitsByVisitCount()
- {
- return $this->renderReport(__FUNCTION__);
- }
-
- /**
- * Returns a rendered report that lists the count of visits for different ranges
- * of days since a visitor's last visit.
- *
- * @return string The rendered report or nothing if $fetch is set to false.
- */
- public function getNumberOfVisitsByDaysSinceLast()
- {
- return $this->renderReport(__FUNCTION__);
- }
}