summaryrefslogtreecommitdiff
path: root/classes/Config.php
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2024-11-04 13:59:02 +0300
committerAndrew Dolgov <fox@fakecake.org>2024-11-04 13:59:02 +0300
commit42ebdb027ec249fb8e693c41d7ee80ecdc68d6ec (patch)
tree85f0b8ebfbb8089b0fb7721471c50062d56e972b /classes/Config.php
parentd8718b757419aab9459b2c40205ae52e5309ce42 (diff)
fix get_self_url() misbehaving in plugins/
Diffstat (limited to 'classes/Config.php')
-rw-r--r--classes/Config.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/Config.php b/classes/Config.php
index ab7f4baef..9235e2c45 100644
--- a/classes/Config.php
+++ b/classes/Config.php
@@ -483,7 +483,7 @@ class Config {
$self_url_path = $proto . '://' . $_SERVER["HTTP_HOST"] . parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
$self_url_path = preg_replace("/(\/api\/{1,})?(\w+\.php)?(\?.*$)?$/", "", $self_url_path);
- $self_url_path = preg_replace("/(\/plugins(.local))\/.{1,}$/", "", $self_url_path);
+ $self_url_path = preg_replace("/(\/plugins(.local)?)\/.{1,}$/", "", $self_url_path);
return rtrim($self_url_path, "/");
}