From 086d666e191264688c0c5a9e34fe1e2228b29820 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 29 Jun 2020 10:51:46 +0200 Subject: [locationinfo] Add option to show hostnames --- modules-available/locationinfo/page.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules-available/locationinfo/page.inc.php') diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php index 13d7d459..0885f446 100644 --- a/modules-available/locationinfo/page.inc.php +++ b/modules-available/locationinfo/page.inc.php @@ -364,7 +364,7 @@ class Page_LocationInfo extends Page if (count($locationids) > 4) { $locationids = array_slice($locationids, 0, 4); } - // Build json struct + // Build struct from POST $conf = array( 'language' => Request::post('language', 'en', 'string'), 'mode' => Request::post('mode', 1, 'int'), @@ -380,6 +380,7 @@ class Page_LocationInfo extends Page 'switchtime' => Request::post('switchtime', 20, 'int'), 'calupdate' => Request::post('calupdate', 120, 'int'), 'roomupdate' => Request::post('roomupdate', 30, 'int'), + 'hostname' => Request::post('hostname', false, 'bool'), ); if ($conf['roomupdate'] < 15) { $conf['roomupdate'] = 15; @@ -1025,6 +1026,7 @@ class Page_LocationInfo extends Page 'locations' => Location::getLocations(), 'locationids' => $panel['locationids'], 'overrides' => json_encode($config['overrides']), + 'hostname_checked' => $config['hostname'] ? 'checked' : '', )); } elseif ($panel['paneltype'] === 'URL') { -- cgit v1.2.3-55-g7522