summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2020-10-22 11:51:40 +0200
committerSimon Rettberg2020-10-22 11:51:40 +0200
commit5d720ee9b2bb678f014c9314f277f146a814395e (patch)
tree5b1f7c9f2795cc69136164d0ecaa22e8ae5b0880
parent[locationinfo] URLPANEL: Allow black- and whitelist simultaneously (diff)
downloadslx-admin-5d720ee9b2bb678f014c9314f277f146a814395e.tar.gz
slx-admin-5d720ee9b2bb678f014c9314f277f146a814395e.tar.xz
slx-admin-5d720ee9b2bb678f014c9314f277f146a814395e.zip
[locationinfo] Relative paths for assets in rewrite mode
In conjunction with the proper reqrite rule, this makes it possible to entirely server the info panel from a dedicated virtual directory, in our case, /panel/
-rw-r--r--modules-available/locationinfo/page.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php
index ec7f25ed..bc918765 100644
--- a/modules-available/locationinfo/page.inc.php
+++ b/modules-available/locationinfo/page.inc.php
@@ -1026,8 +1026,8 @@ class Page_LocationInfo extends Page
}
$data = array();
- preg_match('#^(.*)/#', $_SERVER['PHP_SELF'], $script);
- preg_match('#^([^?]+)/#', $_SERVER['REQUEST_URI'], $request);
+ preg_match('#^/(.*)/#', $_SERVER['PHP_SELF'], $script);
+ preg_match('#^/([^?]+)/#', $_SERVER['REQUEST_URI'], $request);
if ($script[1] !== $request[1]) {
$data['dirprefix'] = $script[1] . '/';
}