diff --git a/src/opnsense/mvc/app/library/OPNsense/Mvc/Dispatcher.php b/src/opnsense/mvc/app/library/OPNsense/Mvc/Dispatcher.php index 34591ad76..cd9d5e71a 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Mvc/Dispatcher.php +++ b/src/opnsense/mvc/app/library/OPNsense/Mvc/Dispatcher.php @@ -59,6 +59,16 @@ class Dispatcher $this->parameters = $parameters; } + /** + * XXX: rename to getMethodName when phalcon is removed and return plain $this->action, + * next cleanup ApiControllerBase. + * @return string action name + */ + public function getActionName() + { + return substr($this->action,0, strlen($this->action)-6); + } + /** * Resolve controller class and inspect method to call, except when the target controller offers a __call * hook in which case we expect the target to offer proper error handling