From 73fb00658bef1a8ee7793d599e672df7bbb043ee Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 4 Nov 2020 11:18:15 +0100 Subject: [locationinfo] Fix: api.php access in redirect mode not working Also get rid of slx-admin prefix / {{dirprefix}}. We now have only one variable to be filled in the template, namely {{api}}, which should also make sure that accessing other module's API is not possible. Matching rewrite rules should land in setup-scripts soon. --- .../locationinfo/templates/frontend-default.html | 18 +++++++++--------- .../locationinfo/templates/frontend-summary.html | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'modules-available/locationinfo/templates') diff --git a/modules-available/locationinfo/templates/frontend-default.html b/modules-available/locationinfo/templates/frontend-default.html index 324ee559..ad2917f4 100755 --- a/modules-available/locationinfo/templates/frontend-default.html +++ b/modules-available/locationinfo/templates/frontend-default.html @@ -26,8 +26,8 @@ optional: DoorSign - - + + - - - - + + + + @@ -950,7 +950,7 @@ optional: */ function queryCalendars() { if (!panelUuid) return; - var url = "{{dirprefix}}api.php?do=locationinfo&get=calendar&uuid=" + panelUuid; + var url = "{{{api}}}get=calendar&uuid=" + panelUuid; $.ajax({ url: url, dataType: 'json', @@ -1502,7 +1502,7 @@ optional: */ function queryPanelChange() { $.ajax({ - url: "{{dirprefix}}api.php?do=locationinfo&get=timestamp&uuid=" + panelUuid, + url: "{{{api}}}get=timestamp&uuid=" + panelUuid, dataType: 'json', cache: false, timeout: 5000, @@ -1525,7 +1525,7 @@ optional: */ function queryRooms() { $.ajax({ - url: "{{dirprefix}}api.php?do=locationinfo&get=machines&uuid=" + panelUuid, + url: "{{{api}}}get=machines&uuid=" + panelUuid, dataType: 'json', cache: false, timeout: 30000, diff --git a/modules-available/locationinfo/templates/frontend-summary.html b/modules-available/locationinfo/templates/frontend-summary.html index 540d0af6..136ac3a5 100644 --- a/modules-available/locationinfo/templates/frontend-summary.html +++ b/modules-available/locationinfo/templates/frontend-summary.html @@ -2,8 +2,8 @@ - - + +