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-19 01:45:57 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-06-19 01:45:57 +0400
commite450ec5a097625bf15da91376e8f81a0977c5a5e (patch)
tree5dc7ac79e559064ffe526361a1ae56993935f46d /core/FrontController.php
parent9bf2d1ca455d4929ef015f7805f44cb70d2cb7bd (diff)
automatically render a single report if possible. Not sure about this yet. handling all this menu stuff makes sense and it does not...
Diffstat (limited to 'core/FrontController.php')
-rw-r--r--core/FrontController.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/core/FrontController.php b/core/FrontController.php
index 0a716d3366..c3fe466b36 100644
--- a/core/FrontController.php
+++ b/core/FrontController.php
@@ -124,15 +124,23 @@ class FrontController extends Singleton
if (!is_callable(array($controller, $action))) {
$report = Report::factory($module, $action);
+ $actionToCall = 'renderWidget';
+ $actionToCheck = $action;
+
+ if (empty($report) && !empty($action) && 'menu' === substr($action, 0, 4)) {
+ $actionToCheck = lcfirst(substr($action, 4));
+ $report = Report::factory($module, $actionToCheck);
+ $actionToCall = 'renderMenuReport';
+ }
if (empty($report) || !$report->isEnabled()) {
throw new Exception("Action '$action' not found in the controller '$controllerClassName'.");
}
$parameters['reportModule'] = $module;
- $parameters['reportAction'] = $action;
+ $parameters['reportAction'] = $actionToCheck;
- return $this->makeController('CoreHome', 'renderWidget', $parameters);
+ return $this->makeController('CoreHome', $actionToCall, $parameters);
}
return array($controller, $action);