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->view->translationDomain = 'icinga';
|
||||
$this->_helper->layout()->isIframe = $this->params->shift('isIframe');
|
||||
$this->_helper->layout()->moduleName = false;
|
||||
|
||||
if ($this->rerenderLayout = $this->params->shift('renderLayout')) {
|
||||
$this->xhrLayout = 'body';
|
||||
}
|
||||
|
@ -375,7 +377,6 @@ class ActionController extends Zend_Controller_Action
|
|||
|
||||
$req = $this->getRequest();
|
||||
$layout = $this->_helper->layout();
|
||||
$layout->moduleName = false;
|
||||
|
||||
if ($user = $req->getUser()) {
|
||||
// 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);
|
||||
$this->moduleName = $request->getModuleName();
|
||||
$this->_helper->layout()->moduleName = $this->moduleName;
|
||||
$this->view->translationDomain = $this->moduleName;
|
||||
$this->moduleInit();
|
||||
}
|
||||
|
@ -59,9 +60,7 @@ class ModuleActionController extends ActionController
|
|||
{
|
||||
$req = $this->getRequest();
|
||||
$resp = $this->getResponse();
|
||||
$layout = $this->_helper->layout();
|
||||
|
||||
$layout->moduleName = $this->moduleName;
|
||||
if ($this->isXhr()) {
|
||||
$resp->setHeader('X-Icinga-Module', $layout->moduleName);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue