aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-03-17 08:23:02 +0000
committerMario <mario@mariovavti.com>2022-03-17 08:23:02 +0000
commit1beadfc6e769cfe21d6c3d6c13f7db29210e40fb (patch)
treec3f0572acae928f68fc2fccb8297f990543ad295 /boot.php
parent4ffd7587a953fa1389326138c37297f046dae155 (diff)
parentf4af532c5a8f37f69035616e2ae7908bf5b77a62 (diff)
downloadvolse-hubzilla-1beadfc6e769cfe21d6c3d6c13f7db29210e40fb.tar.gz
volse-hubzilla-1beadfc6e769cfe21d6c3d6c13f7db29210e40fb.tar.bz2
volse-hubzilla-1beadfc6e769cfe21d6c3d6c13f7db29210e40fb.zip
Merge branch 'volse-fix-stylesheet-root-path' into 'dev'
Use correct base url for stylesheets and js. See merge request hubzilla/core!2015
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/boot.php b/boot.php
index 15f096d87..ff73c0146 100644
--- a/boot.php
+++ b/boot.php
@@ -915,9 +915,14 @@ class App {
if ((x($_SERVER, 'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'], 0, 2) === "q=") {
self::$query_string = str_replace(['<', '>'], ['&lt;', '&gt;'], substr($_SERVER['QUERY_STRING'], 2));
+
// removing trailing / - maybe a nginx problem
if (substr(self::$query_string, 0, 1) == "/")
self::$query_string = substr(self::$query_string, 1);
+
+ // trim trailing '&' if no extra args are present
+ self::$query_string = rtrim(self::$query_string, '&');
+
// change the first & to ?
self::$query_string = preg_replace('/&/', '?', self::$query_string, 1);
}