ActionController: Don't override `X-Icinga-Title` when it's already set

This commit is contained in:
Yonas Habteab 2022-03-09 21:39:17 +01:00 committed by Johannes Meyer
parent 9225462262
commit 4cff1feb8f
1 changed files with 13 additions and 11 deletions

View File

@ -496,6 +496,7 @@ class ActionController extends Zend_Controller_Action
$resp->setReloadCss(true);
}
if ($resp->getHeader('X-Icinga-Title') === null) {
if ($this->view->title) {
if (preg_match('~[\r\n]~', $this->view->title)) {
// TODO: Innocent exception and error log for hack attempts
@ -509,6 +510,7 @@ class ActionController extends Zend_Controller_Action
} else {
$resp->setHeader('X-Icinga-Title', rawurlencode($this->view->defaultTitle), true);
}
}
$layout = $this->_helper->layout();
if ($this->rerenderLayout) {