summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/inc/locationinfo.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2017-07-25 19:02:01 +0200
committerSimon Rettberg2017-07-25 19:02:01 +0200
commitbb53f6136e2950f3d656728be469d318a0d9f606 (patch)
tree4e8648ff6fde4b8496eba6e19afdfd7bf542c241 /modules-available/locationinfo/inc/locationinfo.inc.php
parent[locationinfo] Better error handling in hisinone backend (diff)
downloadslx-admin-bb53f6136e2950f3d656728be469d318a0d9f606.tar.gz
slx-admin-bb53f6136e2950f3d656728be469d318a0d9f606.tar.xz
slx-admin-bb53f6136e2950f3d656728be469d318a0d9f606.zip
[locationinfo] Make panel accessible via slxadmin, add URL type panel
Diffstat (limited to 'modules-available/locationinfo/inc/locationinfo.inc.php')
-rw-r--r--modules-available/locationinfo/inc/locationinfo.inc.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/modules-available/locationinfo/inc/locationinfo.inc.php b/modules-available/locationinfo/inc/locationinfo.inc.php
index 6e6cfcd7..a5feb9ed 100644
--- a/modules-available/locationinfo/inc/locationinfo.inc.php
+++ b/modules-available/locationinfo/inc/locationinfo.inc.php
@@ -64,6 +64,7 @@ class LocationInfo
'mode' => 1,
'vertical' => false,
'eco' => false,
+ 'prettytime' => true,
'scaledaysauto' => true,
'daystoshow' => 7,
'rotation' => 0,
@@ -88,10 +89,21 @@ class LocationInfo
public static function configHook($machineUuid, $panelUuid)
{
- // TODO Panel type
+ $row = Database::queryFirst('SELECT paneltype, panelconfig FROM locationinfo_panel WHERE paneluuid = :uuid',
+ array('uuid' => $panelUuid));
+ if ($row === false) {
+ // TODO: Invalid panel - what should we do?
+ } elseif ($row['paneltype'] === 'URL') {
+ // Check if we should set the insecure SSL mode (accept invalid/self signed certs etc.)
+ $data = json_decode($row['panelconfig'], true);
+ if ($data && $data['insecure-ssl']) {
+ ConfigHolder::add('SLX_BROWSER_INSECURE', '1');
+ }
+ }
ConfigHolder::add('SLX_BROWSER_URL', 'http://' . $_SERVER['SERVER_ADDR'] . '/panel/' . $panelUuid);
ConfigHolder::add('SLX_ADDONS', '', 1000);
- ConfigHolder::add('SLX_LOGOUT_TIMEOUT', 1000);
+ ConfigHolder::add('SLX_LOGOUT_TIMEOUT', '', 1000);
+ ConfigHolder::add('SLX_SCREEN_STANDBY_TIMEOUT', '', 1000);
}
}