From 1ea5778981f62623a5dae5f68f632a077ec6a63c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 10 Oct 2013 14:38:31 +0200 Subject: [PATCH] Temporary overwrite front controller's request when dispatching detail (WIP) refs #4823 --- 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 ce48e7ef1..b90db8e47 100755 --- a/library/Icinga/Web/Controller/ActionController.php +++ b/library/Icinga/Web/Controller/ActionController.php @@ -112,10 +112,12 @@ class ActionController extends Zend_Controller_Action $url = substr($url, strlen($this->getRequest()->getBaseUrl())); // the host is mandatory, but ignored in Zend $req = new Request('http://ignoredhost/' . $url); - + $req->setBaseUrl($this->getRequest()->getBaseUrl()); $router = Zend_Controller_Front::getInstance()->getRouter(); $router->route($req); + Zend_Controller_Front::getInstance()->setRequest($req); $detailHtml = $this->view->action($req->getActionName(), $req->getControllerName(), $req->getModuleName()); + Zend_Controller_Front::getInstance()->setRequest($this->getRequest()); $this->_helper->layout->assign('detailContent', $detailHtml); $this->_helper->layout->assign('detailClass', 'col-sm-12 col-xs-12 col-md-12 col-lg-6'); $this->_helper->layout->assign('mainClass', 'col-sm-12 col-xs-12 col-md-12 col-lg-6');