From 9b46647ca553f67db3562ebd58cd7a60120c0c39 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 31 Oct 2019 15:16:01 +0100 Subject: [statistics] Silence notice about undefined array index --- modules-available/statistics/page.inc.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules-available/statistics/page.inc.php b/modules-available/statistics/page.inc.php index 441f0c25..4a282515 100644 --- a/modules-available/statistics/page.inc.php +++ b/modules-available/statistics/page.inc.php @@ -898,12 +898,8 @@ class Page_Statistics extends Page } // Rebootcontrol if (Module::get('rebootcontrol') !== false) { - if (User::hasPermission('.rebootcontrol.action.reboot', (int)$client['locationid'])) { - $client['canReboot'] = true; - } - if (User::hasPermission('.rebootcontrol.action.shutdown', (int)$client['locationid'])) { - $client['canShutdown'] = true; - } + $client['canReboot'] = (User::hasPermission('.rebootcontrol.action.reboot', (int)$client['locationid'])); + $client['canShutdown'] = (User::hasPermission('.rebootcontrol.action.shutdown', (int)$client['locationid'])); $client['rebootcontrol'] = $client['canReboot'] || $client['canShutdown']; } // Baseconfig -- cgit v1.2.3-55-g7522