summaryrefslogtreecommitdiff
path: root/include/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions.php')
-rw-r--r--include/functions.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/functions.php b/include/functions.php
index 5e75439cf..73d963803 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -236,6 +236,14 @@
}
}
+ function with_trailing_slash(string $str) : string {
+ if (substr($str, -1) === "/") {
+ return $str;
+ } else {
+ return "$str/";
+ }
+ }
+
function make_password($length = 12) {
$password = "";
$possible = "0123456789abcdfghjkmnpqrstvwxyzABCDFGHJKMNPQRSTVWXYZ*%+^";