summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/page.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2017-04-27 15:37:28 +0200
committerSimon Rettberg2017-04-27 15:37:28 +0200
commit60a8431c5816d37405498f933e06d5b1c6cccd13 (patch)
treeea131c804df834621ce1c87f9028d8997da24e4e /modules-available/locationinfo/page.inc.php
parent[locationinfo] Update install.inc.php; Add indexes and constraints (diff)
downloadslx-admin-60a8431c5816d37405498f933e06d5b1c6cccd13.tar.gz
slx-admin-60a8431c5816d37405498f933e06d5b1c6cccd13.tar.xz
slx-admin-60a8431c5816d37405498f933e06d5b1c6cccd13.zip
[locationinfo] Check for valid serverid when saving location config
Diffstat (limited to 'modules-available/locationinfo/page.inc.php')
-rw-r--r--modules-available/locationinfo/page.inc.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php
index 3562ccb3..bda6549b 100644
--- a/modules-available/locationinfo/page.inc.php
+++ b/modules-available/locationinfo/page.inc.php
@@ -70,6 +70,11 @@ class Page_LocationInfo extends Page
Message::addError('location.invalid-location-id', $locationid);
Util::redirect('?do=locationinfo');
}
+ $serverid = Request::post('serverid', 0, 'int');
+ if ($serverid === 0) {
+ Message::addError('main.value-invalid', 'serverid', 0);
+ Util::redirect('?do=locationinfo');
+ }
$result['language'] = Request::post('language', 'en', 'string');
$result['mode'] = Request::post('mode', 1, 'int');
$result['vertical'] = Request::post('vertical', false, 'bool');
@@ -88,7 +93,6 @@ class Page_LocationInfo extends Page
if ($result['calupdate'] < 120) {
$result['calupdate'] = 120;
}
- $serverid = Request::post('serverid', 0, 'int');
$serverlocationid = Request::post('serverlocationid', '', 'string');
Database::exec("INSERT INTO `locationinfo_locationconfig` (locationid, serverid, serverlocationid, config, lastcalendarupdate)