ActionController: Drop new param in method `setAutorefreshInterval()`

This commit is contained in:
Johannes Meyer 2020-12-07 15:59:51 +01:00
parent 6024e84663
commit 765557af69
1 changed files with 5 additions and 8 deletions

View File

@ -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) {
throw new ProgrammingError(
@ -349,13 +349,10 @@ class ActionController extends Zend_Controller_Action
);
}
if (! $bypassUserPreferences) {
$user = $this->getRequest()->getUser();
if ($user !== null) {
$speed = (float) $user->getPreferences()->getValue('icingaweb', 'auto_refresh_speed', 1.0);
$interval = max(round($interval * $speed), min($interval, 5));
}
$user = $this->getRequest()->getUser();
if ($user !== null) {
$speed = (float) $user->getPreferences()->getValue('icingaweb', 'auto_refresh_speed', 1.0);
$interval = max(round($interval * $speed), min($interval, 5));
}
$this->autorefreshInterval = $interval;