diff options
author | Simon Rettberg | 2019-10-31 15:16:01 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-10-31 15:16:01 +0100 |
commit | 9b46647ca553f67db3562ebd58cd7a60120c0c39 (patch) | |
tree | 1a21cb6244d1f693904faeb7de6ad674c07235d2 | |
parent | [statistics/baseconfig] Allow per-machine configvar overrides (diff) | |
download | slx-admin-9b46647ca553f67db3562ebd58cd7a60120c0c39.tar.gz slx-admin-9b46647ca553f67db3562ebd58cd7a60120c0c39.tar.xz slx-admin-9b46647ca553f67db3562ebd58cd7a60120c0c39.zip |
[statistics] Silence notice about undefined array index
-rw-r--r-- | modules-available/statistics/page.inc.php | 8 |
1 files 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 |