git subrepo commit (merge) mailcow/src/mailcow-dockerized
subrepo: subdir: "mailcow/src/mailcow-dockerized"
merged: "f83239ed"
upstream: origin: "https://github.com/mailcow/mailcow-dockerized.git"
branch: "master"
commit: "7627a7a9"
git-subrepo: version: "0.4.6"
origin: "???"
commit: "???"
Change-Id: I88e430779f11ac9848e81a9e4eae549100ed1f94
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/functions.inc.php b/mailcow/src/mailcow-dockerized/data/web/inc/functions.inc.php
index 6418945..3cff09b 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/functions.inc.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/functions.inc.php
@@ -2246,6 +2246,21 @@
break;
}
}
+function getBaseURL() {
+ $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http';
+ $host = $_SERVER['HTTP_HOST'];
+ $base_url = $protocol . '://' . $host;
+
+ return $base_url;
+}
+function uuid4() {
+ $data = openssl_random_pseudo_bytes(16);
+
+ $data[6] = chr(ord($data[6]) & 0x0f | 0x40);
+ $data[8] = chr(ord($data[8]) & 0x3f | 0x80);
+
+ return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
+}
function get_logs($application, $lines = false) {
if ($lines === false) {