summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules-available/locationinfo/page.inc.php5
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");
}