ActionController: isolate ignoreXhrBody

This function is only a workaround for broken forms not redirecting
after submission. Will hopefully be removed soon.
This commit is contained in:
Thomas Gelf 2014-06-22 15:33:38 +02:00
parent b4f8ef74fa
commit 331d756a2a
1 changed files with 3 additions and 8 deletions

View File

@ -77,8 +77,6 @@ class ActionController extends Zend_Controller_Action
private $autorefreshInterval;
private $noXhrBody = false;
private $reloadCss = false;
private $window;
@ -283,7 +281,9 @@ class ActionController extends Zend_Controller_Action
protected function ignoreXhrBody()
{
$this->noXhrBody = true;
if ($this->getRequest()->isXmlHttpRequest()) {
$this->getResponse()->setHeader('X-Icinga-Container', 'ignore');
}
}
public function setAutorefreshInterval($interval)
@ -395,11 +395,6 @@ class ActionController extends Zend_Controller_Action
$resp->setHeader('X-Icinga-CssReload', 'now');
}
if ($this->noXhrBody) {
$resp->setHeader('X-Icinga-Container', 'ignore');
return;
}
if ($this->view->title) {
if (preg_match('~[\r\n]~', $this->view->title)) {
// TODO: Innocent exception and error log for hack attempts