summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2020-07-22 10:58:23 +0200
committerSimon Rettberg2020-07-30 13:32:01 +0200
commit0afd23823323197063dc1c1c61f141e786eb4d19 (patch)
treeba7654d4980fc164d65fd1a0310cdea400417ba9
parent[exams] Collapse old exams (-90 days) (diff)
downloadslx-admin-0afd23823323197063dc1c1c61f141e786eb4d19.tar.gz
slx-admin-0afd23823323197063dc1c1c61f141e786eb4d19.tar.xz
slx-admin-0afd23823323197063dc1c1c61f141e786eb4d19.zip
[remoteaccess] Fix: "active" flag was not honored in getconfig hook
-rw-r--r--modules-available/remoteaccess/baseconfig/getconfig.inc.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules-available/remoteaccess/baseconfig/getconfig.inc.php b/modules-available/remoteaccess/baseconfig/getconfig.inc.php
index 384f498f..8aa6430e 100644
--- a/modules-available/remoteaccess/baseconfig/getconfig.inc.php
+++ b/modules-available/remoteaccess/baseconfig/getconfig.inc.php
@@ -4,7 +4,9 @@
$locationId = ConfigHolder::get('SLX_LOCATIONS');
if ($locationId !== false) {
$locationId = (int)$locationId;
- $ret = Database::queryFirst("SELECT locationid FROM remoteaccess_x_location WHERE locationid = :lid",
+ $ret = Database::queryFirst("SELECT l.locationid FROM remoteaccess_x_location l
+ INNER JOIN remoteaccess_group g USING (groupid)
+ WHERE locationid = :lid AND g.active = 1",
['lid' => $locationId], true); // TODO Remove true after next point release (2020-05-12)
if ($ret !== false) {
// TODO Properly merge