diff options
Diffstat (limited to 'modules-available/remoteaccess/baseconfig/getconfig.inc.php')
-rw-r--r-- | modules-available/remoteaccess/baseconfig/getconfig.inc.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/modules-available/remoteaccess/baseconfig/getconfig.inc.php b/modules-available/remoteaccess/baseconfig/getconfig.inc.php index 6403538d..182daef1 100644 --- a/modules-available/remoteaccess/baseconfig/getconfig.inc.php +++ b/modules-available/remoteaccess/baseconfig/getconfig.inc.php @@ -1,15 +1,18 @@ <?php -(function ($machineUuid) { +/** @var ?string $uuid */ +/** @var ?string $ip */ + +if ($uuid !== null) { // Leave clients in any runmode alone $res = Database::queryFirst('SELECT machineuuid FROM runmode WHERE machineuuid = :uuid', - ['uuid' => $machineUuid], true); + ['uuid' => $uuid], true); if (is_array($res)) return; // Locations from closest to furthest (order) $locationId = ConfigHolder::get('SLX_LOCATIONS'); - if ($locationId === false) + if ($locationId === null) return; $locationId = (int)$locationId; $ret = Database::queryFirst("SELECT l.locationid FROM remoteaccess_x_location l @@ -44,4 +47,4 @@ ConfigHolder::add('SLX_SCREEN_SAVER_GRACE_TIME', '86400', 1000); // Autologin will never work as the machine is immediately in use and will never get assigned ConfigHolder::add('SLX_AUTOLOGIN', 'OFF', 10000); -})($uuid); +} |