mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
ActionController: set layout module name early
Didn't work correctly before
This commit is contained in:
parent
485e2168c1
commit
3772b9c16f
@ -111,6 +111,8 @@ class ActionController extends Zend_Controller_Action
|
|||||||
$this->handlerBrowserWindows();
|
$this->handlerBrowserWindows();
|
||||||
$this->view->translationDomain = 'icinga';
|
$this->view->translationDomain = 'icinga';
|
||||||
$this->_helper->layout()->isIframe = $this->params->shift('isIframe');
|
$this->_helper->layout()->isIframe = $this->params->shift('isIframe');
|
||||||
|
$this->_helper->layout()->moduleName = false;
|
||||||
|
|
||||||
if ($this->rerenderLayout = $this->params->shift('renderLayout')) {
|
if ($this->rerenderLayout = $this->params->shift('renderLayout')) {
|
||||||
$this->xhrLayout = 'body';
|
$this->xhrLayout = 'body';
|
||||||
}
|
}
|
||||||
@ -375,7 +377,6 @@ class ActionController extends Zend_Controller_Action
|
|||||||
|
|
||||||
$req = $this->getRequest();
|
$req = $this->getRequest();
|
||||||
$layout = $this->_helper->layout();
|
$layout = $this->_helper->layout();
|
||||||
$layout->moduleName = false;
|
|
||||||
|
|
||||||
if ($user = $req->getUser()) {
|
if ($user = $req->getUser()) {
|
||||||
// Cast preference app.show_benchmark to bool because preferences loaded from a preferences storage are
|
// Cast preference app.show_benchmark to bool because preferences loaded from a preferences storage are
|
||||||
|
@ -24,6 +24,7 @@ class ModuleActionController extends ActionController
|
|||||||
) {
|
) {
|
||||||
parent::__construct($request, $response, $invokeArgs);
|
parent::__construct($request, $response, $invokeArgs);
|
||||||
$this->moduleName = $request->getModuleName();
|
$this->moduleName = $request->getModuleName();
|
||||||
|
$this->_helper->layout()->moduleName = $this->moduleName;
|
||||||
$this->view->translationDomain = $this->moduleName;
|
$this->view->translationDomain = $this->moduleName;
|
||||||
$this->moduleInit();
|
$this->moduleInit();
|
||||||
}
|
}
|
||||||
@ -59,9 +60,7 @@ class ModuleActionController extends ActionController
|
|||||||
{
|
{
|
||||||
$req = $this->getRequest();
|
$req = $this->getRequest();
|
||||||
$resp = $this->getResponse();
|
$resp = $this->getResponse();
|
||||||
$layout = $this->_helper->layout();
|
|
||||||
|
|
||||||
$layout->moduleName = $this->moduleName;
|
|
||||||
if ($this->isXhr()) {
|
if ($this->isXhr()) {
|
||||||
$resp->setHeader('X-Icinga-Module', $layout->moduleName);
|
$resp->setHeader('X-Icinga-Module', $layout->moduleName);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user