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@gmail.com>2013-10-02 00:35:58 +0400
committerThomas Steur <thomas.steur@gmail.com>2013-10-02 00:35:58 +0400
commit676327fd96735d2749829c5eae0f16dbe04dda90 (patch)
tree5533337621a75ec0a37e230ea72126a6a427c124
parent7abaeb935f04b5c983289c2fd85d7763c6977029 (diff)
refs #4134 trigger general API event for all actions
-rw-r--r--core/API/Proxy.php21
1 files changed, 12 insertions, 9 deletions
diff --git a/core/API/Proxy.php b/core/API/Proxy.php
index ab3b8b5aeb..192d43bb0c 100644
--- a/core/API/Proxy.php
+++ b/core/API/Proxy.php
@@ -181,18 +181,21 @@ class Proxy
// start the timer
$timer = new Timer();
+ // allow plugins to manipulate the value
+ $pluginName = $this->getModuleNameFromClassName($className);
+
+ Piwik_PostEvent(sprintf('API.%s.%s', $pluginName, $methodName), array($finalParameters));
+
// call the method
$returnedValue = call_user_func_array(array($object, $methodName), $finalParameters);
- // allow plugins to manipulate the value
- $pluginName = $this->getModuleNameFromClassName($className);
- Piwik_PostEvent('API.Request.end', array(
- &$returnedValue,
- array('className' => $className,
- 'module' => $pluginName,
- 'action' => $methodName,
- 'parameters' => &$parametersRequest)
- ));
+ Piwik_PostEvent(sprintf('API.%s.%s.end', $pluginName, $methodName), array(
+ &$returnedValue,
+ array('className' => $className,
+ 'module' => $pluginName,
+ 'action' => $methodName,
+ 'parameters' => $finalParameters)
+ ));
// Restore the request
$_GET = $saveGET;