Skip to content
Extraits de code Groupes Projets
Valider a385e545 rédigé par Matthieu Aubry's avatar Matthieu Aubry
Parcourir les fichiers

Fixing Hook event values set correctly in frontcontroller

parent 3fb5c010
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -85,8 +85,7 @@ class FrontController extends Singleton ...@@ -85,8 +85,7 @@ class FrontController extends Singleton
return; return;
} }
// list($module, $action, $parameters, $controller) list($module, $action, $parameters, $controller) = $this->prepareDispatch($module, $action, $parameters);
$params = $this->prepareDispatch($module, $action, $parameters);
/** /**
* Generic hook that plugins can use to modify any input to the function, or even change the plugin being * Generic hook that plugins can use to modify any input to the function, or even change the plugin being
...@@ -95,7 +94,7 @@ class FrontController extends Singleton ...@@ -95,7 +94,7 @@ class FrontController extends Singleton
* *
* The `$params` array contains the following properties: `array($module, $action, $parameters, $controller)` * The `$params` array contains the following properties: `array($module, $action, $parameters, $controller)`
*/ */
Piwik::postEvent('Request.dispatch', $params); Piwik::postEvent('Request.dispatch', $module, $action, $parameters);
/** /**
* This event is similar to the `Request.dispatch` hook. It distinguishes the possibility to subscribe only to a * This event is similar to the `Request.dispatch` hook. It distinguishes the possibility to subscribe only to a
...@@ -105,7 +104,7 @@ class FrontController extends Singleton ...@@ -105,7 +104,7 @@ class FrontController extends Singleton
Piwik::postEvent(sprintf('Controller.%s.%s', $module, $action), array($parameters)); Piwik::postEvent(sprintf('Controller.%s.%s', $module, $action), array($parameters));
try { try {
$result = call_user_func_array(array($params[3], $params[1]), $params[2]); $result = call_user_func_array(array($controller, $action), $parameters);
/** /**
* This event is similar to the `Request.dispatch.end` hook. It distinguishes the possibility to subscribe * This event is similar to the `Request.dispatch.end` hook. It distinguishes the possibility to subscribe
...@@ -473,4 +472,4 @@ class PluginDeactivatedException extends Exception ...@@ -473,4 +472,4 @@ class PluginDeactivatedException extends Exception
{ {
parent::__construct("The plugin $module is not enabled. You can activate the plugin on Settings > Plugins page in Piwik."); 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
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter