From 0d52bb421f088dd25247167bc21e8ed8c1584c50 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 12 Jul 2017 16:52:36 +0200 Subject: [PATCH] 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. --- library/Icinga/Web/Controller/ActionController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Web/Controller/ActionController.php b/library/Icinga/Web/Controller/ActionController.php index e51ff76e5..35eec1a17 100644 --- a/library/Icinga/Web/Controller/ActionController.php +++ b/library/Icinga/Web/Controller/ActionController.php @@ -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) {