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/API/Request.php')
-rw-r--r--core/API/Request.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/API/Request.php b/core/API/Request.php
index 91d664af56..f627dd5f0b 100644
--- a/core/API/Request.php
+++ b/core/API/Request.php
@@ -149,12 +149,12 @@ class Request
if (!PluginsManager::getInstance()->isPluginActivated($module)) {
throw new PluginDeactivatedException($module);
}
- $moduleClass = "Piwik_" . $module . "_API";
+ $apiClassName = $this->getClassNameAPI($module);
self::reloadAuthUsingTokenAuth($this->request);
// call the method
- $returnedValue = Proxy::getInstance()->call($moduleClass, $method, $this->request);
+ $returnedValue = Proxy::getInstance()->call($apiClassName, $method, $this->request);
$toReturn = $response->getResponse($returnedValue, $module, $method);
} catch (Exception $e) {
@@ -163,6 +163,11 @@ class Request
return $toReturn;
}
+ static public function getClassNameAPI($module)
+ {
+ return "\\Piwik\\Plugins\\$module\\API";
+ }
+
/**
* If the token_auth is found in the $request parameter,
* the current session will be authenticated using this token_auth.