ActionController: Drop new param in method `setAutorefreshInterval()`
This commit is contained in:
parent
6024e84663
commit
765557af69
|
@ -341,7 +341,7 @@ class ActionController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setAutorefreshInterval($interval, $bypassUserPreferences = false)
|
public function setAutorefreshInterval($interval)
|
||||||
{
|
{
|
||||||
if (! is_int($interval) || $interval < 1) {
|
if (! is_int($interval) || $interval < 1) {
|
||||||
throw new ProgrammingError(
|
throw new ProgrammingError(
|
||||||
|
@ -349,14 +349,11 @@ class ActionController extends Zend_Controller_Action
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $bypassUserPreferences) {
|
|
||||||
$user = $this->getRequest()->getUser();
|
$user = $this->getRequest()->getUser();
|
||||||
|
|
||||||
if ($user !== null) {
|
if ($user !== null) {
|
||||||
$speed = (float) $user->getPreferences()->getValue('icingaweb', 'auto_refresh_speed', 1.0);
|
$speed = (float) $user->getPreferences()->getValue('icingaweb', 'auto_refresh_speed', 1.0);
|
||||||
$interval = max(round($interval * $speed), min($interval, 5));
|
$interval = max(round($interval * $speed), min($interval, 5));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$this->autorefreshInterval = $interval;
|
$this->autorefreshInterval = $interval;
|
||||||
$this->_helper->layout()->autorefreshInterval = $interval;
|
$this->_helper->layout()->autorefreshInterval = $interval;
|
||||||
|
|
Loading…
Reference in New Issue