From 4fda5ccd0e248750f68b4a9802044d02f84eb7cc Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 4 Mar 2021 13:40:54 +0300 Subject: fix a bunch of bookmarklets login forms not leading back --- include/functions.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/functions.php') 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*%+^"; -- cgit v1.2.3