ActionController: Set autorefresh interval on view as late as possible

This allows to initialize property `$autorefreshInterval` and have it
take an effect on non-XHR requests.
This commit is contained in:
Johannes Meyer 2020-12-07 16:00:27 +01:00
parent 765557af69
commit f1dd69d877
1 changed files with 6 additions and 2 deletions

View File

@ -356,14 +356,14 @@ class ActionController extends Zend_Controller_Action
}
$this->autorefreshInterval = $interval;
$this->_helper->layout()->autorefreshInterval = $interval;
return $this;
}
public function disableAutoRefresh()
{
$this->autorefreshInterval = null;
$this->_helper->layout()->autorefreshInterval = null;
return $this;
}
@ -480,6 +480,10 @@ class ActionController extends Zend_Controller_Action
}
}
if ($this->autorefreshInterval !== null) {
$layout->autorefreshInterval = $this->autorefreshInterval;
}
if ($req->getParam('error_handler') === null && $req->getParam('format') === 'pdf') {
$this->sendAsPdf();
$this->shutdownSession();