From 675bcfe18906171f6fb00dd2e27d861064b28ab8 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Wed, 22 Sep 2021 17:01:58 +1000 Subject: updating url::getroot otherwise things may look weird e.g. urls in confirmation email would start with `/` --- h-source/Library/Url.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/h-source/Library/Url.php b/h-source/Library/Url.php index 5124047..efb8e6e 100755 --- a/h-source/Library/Url.php +++ b/h-source/Library/Url.php @@ -27,7 +27,9 @@ class Url { //get the url starting from the root folder public static function getRoot($pathFromRootFolder = null) { - $url = MOD_REWRITE_MODULE === true ? '/' . $pathFromRootFolder : '/index.php/' . $pathFromRootFolder; + $protocol = Params::$useHttps ? "https" : "http"; + + $url = MOD_REWRITE_MODULE === true ? "$protocol://" . DOMAIN_NAME . '/' . $pathFromRootFolder : "$protocol://" . DOMAIN_NAME . '/index.php/' . $pathFromRootFolder; return $url; } -- cgit v1.2.3