diff options
author | Simon Rettberg | 2017-04-27 14:34:21 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-04-27 14:34:21 +0200 |
commit | 01cf034f8a7ac1d4b56f231b1e70147962d3a365 (patch) | |
tree | 8d3d7c137f8517dbf18d878224c434b9677b81bf /modules-available/locationinfo/page.inc.php | |
parent | Merge branch 'master' into location-info-panel (diff) | |
download | slx-admin-01cf034f8a7ac1d4b56f231b1e70147962d3a365.tar.gz slx-admin-01cf034f8a7ac1d4b56f231b1e70147962d3a365.tar.xz slx-admin-01cf034f8a7ac1d4b56f231b1e70147962d3a365.zip |
[locationinfo] Regression: Fix editing location with no previous config
Diffstat (limited to 'modules-available/locationinfo/page.inc.php')
-rw-r--r-- | modules-available/locationinfo/page.inc.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php index eb50193e..3562ccb3 100644 --- a/modules-available/locationinfo/page.inc.php +++ b/modules-available/locationinfo/page.inc.php @@ -545,7 +545,10 @@ class Page_LocationInfo extends Page private function ajaxLoadLocationConfig($id) { // Get Config data from db - $location = Database::queryFirst("SELECT config, serverid, serverlocationid FROM `locationinfo_locationconfig` WHERE locationid = :id", array('id' => $id)); + $location = Database::queryFirst("SELECT lc.config, lc.serverid, lc.serverlocationid + FROM location l + LEFT JOIN `locationinfo_locationconfig` lc USING (locationid) + WHERE l.locationid = :id", array('id' => $id)); if ($location === false) { die("Invalid location id: $id"); } |