From 42ebdb027ec249fb8e693c41d7ee80ecdc68d6ec Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 4 Nov 2024 13:59:02 +0300 Subject: fix get_self_url() misbehaving in plugins/ --- classes/Config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes/Config.php') 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, "/"); } -- cgit v1.2.3-54-g00ecf