commit 5722d959f88575fc02f96e3a02d5f4b9cedf0448
parent 555ea356b728715cb0f6e26e4a3122d9eda454bf
Author: Jan Dankert <devnull@localhost>
Date: Sat, 30 Dec 2017 01:27:19 +0100
Die Action kann,z.B. bei Aliases, ihren Methodennamen selbst verändern. In diesem Fall muss auch das Template korrigiert werden.
Diffstat:
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/cms-core/Dispatcher.class.php b/modules/cms-core/Dispatcher.class.php
@@ -235,8 +235,10 @@ class Dispatcher
if (!method_exists($do, $subactionMethodName))
Http::noContent();
- // Jetzt wird die Aktion aus der Actionklasse aufgerufen.
- $result = $do->$subactionMethodName();
+ $result = $do->$subactionMethodName(); // <== Executing the Action
+
+ // The action is able to change its method name.
+ $this->subaction = $do->subActionName;
Logger::trace('Output' . "\n" . print_r($result, true));
diff --git a/modules/cms-ui/UI.class.php b/modules/cms-ui/UI.class.php
@@ -47,6 +47,9 @@ class UI
$data = $dispatcher->doAction();
+ // The action is able to change its method name.
+ $subaction = $dispatcher->subaction;
+
$httpAccept = getenv('HTTP_ACCEPT');
$types = explode(',', $httpAccept);