summaryrefslogtreecommitdiffstats
path: root/modules-available/roomplanner
diff options
context:
space:
mode:
authorSimon Rettberg2017-12-01 12:30:23 +0100
committerSimon Rettberg2017-12-01 12:30:23 +0100
commit5c23e7d7e1c9ade9755c530c9320ad7e5b463413 (patch)
tree0d3fe9af484faad0204e1c50d0c3b30b64f3f62d /modules-available/roomplanner
parent[locationinfo] Fix room scaling (diff)
downloadslx-admin-5c23e7d7e1c9ade9755c530c9320ad7e5b463413.tar.gz
slx-admin-5c23e7d7e1c9ade9755c530c9320ad7e5b463413.tar.xz
slx-admin-5c23e7d7e1c9ade9755c530c9320ad7e5b463413.zip
[statistics, roomplanner, locationinfo] Ignore machines with runmode:isclient==0
Diffstat (limited to 'modules-available/roomplanner')
-rw-r--r--modules-available/roomplanner/inc/pvsgenerator.inc.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/modules-available/roomplanner/inc/pvsgenerator.inc.php b/modules-available/roomplanner/inc/pvsgenerator.inc.php
index 6dc9b648..6df7c10e 100644
--- a/modules-available/roomplanner/inc/pvsgenerator.inc.php
+++ b/modules-available/roomplanner/inc/pvsgenerator.inc.php
@@ -54,9 +54,18 @@ class PvsGenerator
/* collect names and build room blocks - filter empty rooms while at it */
$roomNames = array();
$roomBlocks = '';
+ $overrides = [];
foreach ($rooms as $room) {
- if (is_null($room['notnull']) || isset($room['skip']) // Not leaf
- || empty($room['managerip'])) // rooms without managerips don't make sense
+ if (is_null($room['notnull']) || isset($room['skip'])) // Not leaf
+ continue;
+ if (Module::isAvailable('runmode')) {
+ $pc = RunMode::getForMode('roomplanner', $room['locationid']);
+ if (!empty($pc)) {
+ $pc = array_pop($pc);
+ $room['managerip'] = $pc['clientip'];
+ }
+ }
+ if (empty($room['managerip'])) // rooms without managerips don't make sense
continue;
$roomBlock = PvsGenerator::generateRoomBlock($room);
if ($roomBlock === false)