diff options
Diffstat (limited to 'modules-available/locationinfo/page.inc.php')
| -rw-r--r-- | modules-available/locationinfo/page.inc.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php index 1a58131f..decaa8f2 100644 --- a/modules-available/locationinfo/page.inc.php +++ b/modules-available/locationinfo/page.inc.php @@ -347,6 +347,11 @@ class Page_LocationInfo extends Page } $bookmarkString = substr($bookmarkString, 0, -1); + $rotation = strtolower(Request::post('screen-rotation', '', 'string')); + if (!in_array($rotation, ['', 'left', 'right', 'inverted'])) { + $rotation = ''; + } + $conf = array( 'url' => Request::post('url', 'https://www.bwlehrpool.de/', 'string'), 'insecure-ssl' => Request::post('insecure-ssl', 0, 'int'), @@ -359,7 +364,9 @@ class Page_LocationInfo extends Page 'hw-video' => Request::post('hw-video', '0', 'bool'), 'bookmarks' => $bookmarkString ?: '', 'allow-tty' => Request::post('allow-tty', '', 'string'), - 'zoom-factor' => Request::post('zoom-factor', 100, 'int'), + 'zoom-factor' => max(0, Request::post('zoom-factor', 100, 'int')), + 'language' => str_replace(['_', ' '], ['-', ''], Request::post('language', '', 'string')), + 'screen-rotation' => $rotation, ); return array('config' => $conf, 'locationids' => []); } @@ -1007,6 +1014,8 @@ class Page_LocationInfo extends Page 'panelname' => $panel['panelname'], 'url' => $config['url'], 'zoom-factor' => $config['zoom-factor'], + 'language' => $config['language'], + 'screen-rotation' => $config['screen-rotation'], 'ssl_checked' => $config['insecure-ssl'] ? 'checked' : '', 'reloadminutes' => (int)$config['reload-minutes'], 'whitelist' => str_replace("\n", "\r\n", $config['whitelist']), |
