From c7d61a4e93289422932fc4398bab8636905015a3 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <gohr@cosmocode.de> Date: Thu, 7 Sep 2017 15:54:21 +0200 Subject: [PATCH] pass action name by reference. fixes #2117 This fixes plugins that expect that they can change the global $ACT instead of $event->data in the ACTION_ACT_PREPROCESS event. This make the whole route a little bit uncleaner but would increase backwards compatibility. I'm not sure how widespread the problem is and if adding this is a good idea. --- inc/ActionRouter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/ActionRouter.php b/inc/ActionRouter.php index c29ba99f2..7e6fddd16 100644 --- a/inc/ActionRouter.php +++ b/inc/ActionRouter.php @@ -68,10 +68,10 @@ class ActionRouter { * Instantiates the right class, runs permission checks and pre-processing and * sets $action * - * @param string $actionname + * @param string $actionname this is passed as a reference to $ACT, for plugin backward compatibility * @triggers ACTION_ACT_PREPROCESS */ - protected function setupAction($actionname) { + protected function setupAction(&$actionname) { $presetup = $actionname; try { -- GitLab