Dispatcher: Default to the default module if no module has been given in the request
This is most likely the case when custom routes have been added to the router w/o the module parameter being set. refs #5786
This commit is contained in:
parent
c0eb0cbe6a
commit
e7e1b1a98e
|
@ -44,7 +44,8 @@ class Dispatcher extends Zend_Controller_Dispatcher_Standard
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$controllerName = ucfirst($controllerName) . 'Controller';
|
$controllerName = ucfirst($controllerName) . 'Controller';
|
||||||
if ($this->_defaultModule === $moduleName = $request->getModuleName()) {
|
$moduleName = $request->getModuleName();
|
||||||
|
if ($moduleName === null || $moduleName === $this->_defaultModule) {
|
||||||
$controllerClass = 'Icinga\\' . self::CONTROLLER_NAMESPACE . '\\' . $controllerName;
|
$controllerClass = 'Icinga\\' . self::CONTROLLER_NAMESPACE . '\\' . $controllerName;
|
||||||
} else {
|
} else {
|
||||||
$controllerClass = 'Icinga\\Module\\' . ucfirst($moduleName) . '\\' . self::CONTROLLER_NAMESPACE . '\\'
|
$controllerClass = 'Icinga\\Module\\' . ucfirst($moduleName) . '\\' . self::CONTROLLER_NAMESPACE . '\\'
|
||||||
|
|
Loading…
Reference in New Issue