summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-02-07 15:06:17 +0100
committerSimon Rettberg2024-02-07 15:06:17 +0100
commitda0da6118b04a3b0bd4d12d6b96c25a4fa15d14c (patch)
tree7ff771c91750e10bd09592235fb009fdd324934d
parentRevert "[statistics_reporting] Consider all machines in DB" (diff)
downloadslx-admin-da0da6118b04a3b0bd4d12d6b96c25a4fa15d14c.tar.gz
slx-admin-da0da6118b04a3b0bd4d12d6b96c25a4fa15d14c.tar.xz
slx-admin-da0da6118b04a3b0bd4d12d6b96c25a4fa15d14c.zip
[roomplanner] Fix passed type to runmode
-rw-r--r--modules-available/roomplanner/page.inc.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules-available/roomplanner/page.inc.php b/modules-available/roomplanner/page.inc.php
index 902df139..94bc3f78 100644
--- a/modules-available/roomplanner/page.inc.php
+++ b/modules-available/roomplanner/page.inc.php
@@ -339,7 +339,7 @@ class Page_Roomplanner extends Page
}
}
- protected function saveRoomConfig($furniture, $tutorUuid)
+ protected function saveRoomConfig(?array $furniture, ?string $tutorUuid)
{
$obj = json_encode(['furniture' => $furniture]);
$managerIp = Request::post('managerip', '', 'string');
@@ -350,10 +350,10 @@ class Page_Roomplanner extends Page
'locationid' => $this->locationid,
'roomplan' => $obj,
'managerip' => $managerIp,
- 'tutoruuid' => $tutorUuid
+ 'tutoruuid' => $tutorUuid,
]);
// See if the client is known, set run-mode
- RunMode::deleteMode(Page::getModule(), $this->locationid);
+ RunMode::deleteMode(Page::getModule(), (string)$this->locationid);
if (!empty($managerIp)) {
$pc = Statistics::getMachinesByIp($managerIp, Machine::NO_DATA, 'lastseen DESC');
if (!empty($pc)) {
@@ -379,7 +379,7 @@ class Page_Roomplanner extends Page
/**
* @return array{computers: array}
*/
- protected function getMachinesOnPlan(string $tutorUuid): array
+ protected function getMachinesOnPlan(?string $tutorUuid): array
{
$result = Database::simpleQuery('SELECT machineuuid, macaddr, clientip, hostname, position
FROM machine