Merge branch 'bugfix/benchmark-not-always-rendered-10856'

fixes #10856
This commit is contained in:
Eric Lippmann 2016-02-27 22:49:44 +01:00
commit 9c5dfc5207
1 changed files with 3 additions and 5 deletions

View File

@ -459,15 +459,13 @@ class ActionController extends Zend_Controller_Action
$layout->innerLayout = $this->innerLayout; $layout->innerLayout = $this->innerLayout;
if ($user = $req->getUser()) { if ($user = $req->getUser()) {
// Cast preference app.show_benchmark to bool because preferences loaded from a preferences storage are if ((bool) $user->getPreferences()->getValue('icingaweb', 'show_benchmark', false)) {
// always strings if ($this->_helper->layout()->isEnabled()) {
if ((bool) $user->getPreferences()->getValue('icingaweb', 'show_benchmark', false) === true) {
if (!$this->_helper->viewRenderer->getNoRender()) {
$layout->benchmark = $this->renderBenchmark(); $layout->benchmark = $this->renderBenchmark();
} }
} }
if ((bool) $user->getPreferences()->getValue('icingaweb', 'auto_refresh', true) === false) { if (! (bool) $user->getPreferences()->getValue('icingaweb', 'auto_refresh', true)) {
$this->disableAutoRefresh(); $this->disableAutoRefresh();
} }
} }