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:
Diffstat (limited to 'core/FrontController.php')
-rw-r--r--core/FrontController.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/core/FrontController.php b/core/FrontController.php
index 4b267bfba6..88ddad8cf8 100644
--- a/core/FrontController.php
+++ b/core/FrontController.php
@@ -99,7 +99,7 @@ class FrontController
throw new PluginDeactivatedException($module);
}
- $controllerClassName = 'Piwik_' . $module . '_Controller';
+ $controllerClassName = $this->getClassNameController( $module );
// FrontController's autoloader
if (!class_exists($controllerClassName, false)) {
@@ -110,7 +110,9 @@ class FrontController
require_once $moduleController; // prefixed by PIWIK_INCLUDE_PATH
}
- $controller = new $controllerClassName();
+ $class = $this->getClassNameController($module);
+ /** @var $controller Controller */
+ $controller = new $class;
if ($action === false) {
$action = $controller->getDefaultAction();
}
@@ -135,6 +137,11 @@ class FrontController
}
}
+ protected function getClassNameController($module)
+ {
+ return "\\Piwik\\Plugins\\$module\\Controller";
+ }
+
/**
* Often plugins controller display stuff using echo/print.
* Using this function instead of dispatch() returns the output string form the actions calls.
@@ -365,4 +372,4 @@ class PluginDeactivatedException extends Exception
{
parent::__construct("The plugin $module is not enabled. You can activate the plugin on Settings > Plugins page in Piwik.");
}
-} \ No newline at end of file
+}