summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/page.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2017-12-07 13:30:55 +0100
committerSimon Rettberg2017-12-07 13:30:55 +0100
commit477ff83eadf4118e8a5531fff7a6b6043e824fd1 (patch)
tree74a8396964d86831e4d413d30e5f48766ce4083f /modules-available/locationinfo/page.inc.php
parent[sysconfig] Improve UI (diff)
downloadslx-admin-477ff83eadf4118e8a5531fff7a6b6043e824fd1.tar.gz
slx-admin-477ff83eadf4118e8a5531fff7a6b6043e824fd1.tar.xz
slx-admin-477ff83eadf4118e8a5531fff7a6b6043e824fd1.zip
[locationinfo] Fix handling of invalid backends, remove dummy-backend in production
Diffstat (limited to 'modules-available/locationinfo/page.inc.php')
-rw-r--r--modules-available/locationinfo/page.inc.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php
index d6035869..c6aa0860 100644
--- a/modules-available/locationinfo/page.inc.php
+++ b/modules-available/locationinfo/page.inc.php
@@ -449,7 +449,7 @@ class Page_LocationInfo extends Page
$locations = Location::getLocations(0, 0, false, true);
// Get hidden state of all locations
- $dbquery = Database::simpleQuery("SELECT li.locationid, li.serverid, li.serverlocationid, li.openingtime, li.lastcalendarupdate, cb.servername
+ $dbquery = Database::simpleQuery("SELECT li.locationid, li.serverid, li.serverlocationid, li.openingtime, li.lastcalendarupdate, cb.servertype, cb.servername
FROM `locationinfo_locationconfig` AS li
LEFT JOIN `locationinfo_coursebackend` AS cb USING (serverid)");
@@ -466,6 +466,7 @@ class Page_LocationInfo extends Page
'openingGlyph' => $glyph,
'backend' => $backend,
'lastCalendarUpdate' => $row['lastcalendarupdate'], // TODO
+ 'backendMissing' => !CourseBackend::exists($row['servertype']),
);
}