summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/inc/locationinfohooks.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/locationinfo/inc/locationinfohooks.inc.php')
-rw-r--r--modules-available/locationinfo/inc/locationinfohooks.inc.php28
1 files changed, 19 insertions, 9 deletions
diff --git a/modules-available/locationinfo/inc/locationinfohooks.inc.php b/modules-available/locationinfo/inc/locationinfohooks.inc.php
index 8ec217cc..406d03c1 100644
--- a/modules-available/locationinfo/inc/locationinfohooks.inc.php
+++ b/modules-available/locationinfo/inc/locationinfohooks.inc.php
@@ -25,10 +25,6 @@ class LocationInfoHooks
if ($type === null)
return; // TODO: Invalid panel - what should we do?
if ($type === 'URL') {
- // Check if we should set the insecure SSL mode (accept invalid/self signed certs etc.)
- if ($data['insecure-ssl'] !== 0) {
- ConfigHolder::add('SLX_BROWSER_INSECURE', '1');
- }
if ($data['reload-minutes'] > 0) {
ConfigHolder::add('SLX_BROWSER_RELOAD_SECS', $data['reload-minutes'] * 60);
}
@@ -52,16 +48,30 @@ class LocationInfoHooks
ConfigHolder::add('SLX_ADDONS', '', 1000);
}
if (!empty($data['browser'])) {
- if ($data['browser'] === 'chromium') {
+ $browser = $data['browser'];
+ if ($browser === 'chromium') {
$browser = 'chromium chrome';
- } else {
+ } elseif ($browser === 'slx-browser') {
$browser = 'slxbrowser slx-browser';
- $data['interactive'] = (isset($data['split-login']) && $data['split-login']);
}
ConfigHolder::add('SLX_BROWSER', $browser, 1000);
+ // There was probably some reason for this: When split-login is enabled, we force
+ // an interactive browser (full UI). I guess because some users might not
+ // know how to exit the browser otherwise? Past me was stupid enough not to leave
+ // a comment here or in the commit message....
+ $data['interactive'] = (isset($data['split-login']) && $data['split-login']);
}
- if (isset($data['interactive']) && $data['interactive']) {
- ConfigHolder::add('SLX_BROWSER_INTERACTIVE', '1', 1000);
+ // Check if we should enable insecure SSL mode (accept invalid/self-signed certs etc.),
+ // if we should display the full UI, and whether we force HW acceleration for video playback
+ $features = [
+ 'insecure-ssl' => 'SLX_BROWSER_INSECURE',
+ 'interactive' => 'SLX_BROWSER_INTERACTIVE',
+ 'hw-video' => 'SLX_BROWSER_HWVIDEO',
+ ];
+ foreach ($features as $key => $var) {
+ if ($data[$key] ?? false) {
+ ConfigHolder::add($var, '1', 1000);
+ }
}
if (!empty($data['bookmarks'])) {
ConfigHolder::add('SLX_BROWSER_BOOKMARKS', $data['bookmarks'], 1000);