diff options
| author | Simon Rettberg | 2025-07-24 11:40:48 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2025-07-24 11:40:48 +0200 |
| commit | c253bbb41356f09c274e97cb7144e6a78ab5a088 (patch) | |
| tree | 7e88f44b648999b157be656ca55198893ff82f7f /modules-available/statistics | |
| parent | [minilinux/rebootcontrol/statistics] Refactor to better suit audit logging (diff) | |
| download | slx-admin-c253bbb41356f09c274e97cb7144e6a78ab5a088.tar.gz slx-admin-c253bbb41356f09c274e97cb7144e6a78ab5a088.tar.xz slx-admin-c253bbb41356f09c274e97cb7144e6a78ab5a088.zip | |
[roomplanner] Add type annotations, change falsable -> nullable
Diffstat (limited to 'modules-available/statistics')
| -rw-r--r-- | modules-available/statistics/pages/list.inc.php | 4 | ||||
| -rw-r--r-- | modules-available/statistics/pages/machine.inc.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules-available/statistics/pages/list.inc.php b/modules-available/statistics/pages/list.inc.php index f9cf413c..0cb4a141 100644 --- a/modules-available/statistics/pages/list.inc.php +++ b/modules-available/statistics/pages/list.inc.php @@ -159,9 +159,9 @@ class SubPage $side = []; if (!empty($rows) && !empty($colValCount)) { if (count($colValCount['locationid']) === 1 - && ($lid = array_key_first($colValCount['locationid'])) > 0 + && ($lid = (int)array_key_first($colValCount['locationid'])) > 0 && Module::isAvailable('roomplanner')) { - $roomsvg = PvsGenerator::generateSvg($lid, false, 0, 1, true, $colValCount['locationid'][$lid]); + $roomsvg = PvsGenerator::generateSvg($lid, null, 0, 1, true, $colValCount['locationid'][$lid]); } // Handle our selected attributes foreach (['locationid', 'cpumodel', 'nic-speed_s', 'gbram', 'gbtmp'] as $key) { diff --git a/modules-available/statistics/pages/machine.inc.php b/modules-available/statistics/pages/machine.inc.php index 1fc9efd8..f7ebd472 100644 --- a/modules-available/statistics/pages/machine.inc.php +++ b/modules-available/statistics/pages/machine.inc.php @@ -72,7 +72,7 @@ class SubPage $locations = Location::getLocationRootChain($client['locationid']); } if ($client['locationid'] && $client['hasroomplan'] && Module::isAvailable('roomplanner')) { - $client['roomsvg'] = PvsGenerator::generateSvg($client['locationid'], $client['machineuuid'], + $client['roomsvg'] = PvsGenerator::generateSvg((int)$client['locationid'], $client['machineuuid'], 0, 1, true); } User::assertPermission('machine.view-details', (int)$client['locationid']); |
