ActionController: Don't re-enable the layout when just setting XHR layout

In case someone doesn't want the layout, we should not force it, especially
not for XHR requests.
This commit is contained in:
Johannes Meyer 2017-07-12 16:52:36 +02:00
parent 73f254ff32
commit 0d52bb421f
1 changed files with 3 additions and 1 deletions

View File

@ -527,7 +527,9 @@ class ActionController extends Zend_Controller_Action
$layout->setLayout($this->innerLayout);
$this->getResponse()->setHeader('X-Icinga-Container', 'layout', true);
} else {
$layout->setLayout($this->inlineLayout);
// The layout may be disabled and there's no indication that the layout is explicitly desired,
// that's why we're passing false as second parameter to setLayout
$layout->setLayout($this->inlineLayout, false);
}
if ($this->autorefreshInterval !== null) {