From b64c14b0c2167077810e4e311645e4a9dd7fadc7 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Tue, 12 Apr 2022 15:29:23 +0200 Subject: [PATCH] Use setTitle() instead of setting resp headrs directly --- application/controllers/DashboardsController.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/application/controllers/DashboardsController.php b/application/controllers/DashboardsController.php index 07444078b..da045f8b8 100644 --- a/application/controllers/DashboardsController.php +++ b/application/controllers/DashboardsController.php @@ -211,8 +211,6 @@ class DashboardsController extends CompatController $paneForm = new RemoveHomePaneForm($this->dashboard); $paneForm->populate(['org_name' => $paneParam]); $paneForm->on(RemoveHomePaneForm::ON_SUCCESS, function () { - $this->getResponse()->setAutoRefreshInterval(1); - $this->redirectNow(Url::fromPath(Dashboard::BASE_ROUTE . '/settings')); })->handleRequest(ServerRequest::fromGlobals()); @@ -385,7 +383,7 @@ class DashboardsController extends CompatController // rendered in the modal view when redirecting $this->view->compact = true; - $this->getResponse()->setHeader('X-Icinga-Title', t('Configure Dashlets'), true); + $this->setTitle(t('Configure Dashlets')); } else { $this->setTitle(t('Add Dashlet')); }