diff options
Diffstat (limited to 'includes/util/functions.inc')
-rw-r--r-- | includes/util/functions.inc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/includes/util/functions.inc b/includes/util/functions.inc index 9b6f356..8b22709 100644 --- a/includes/util/functions.inc +++ b/includes/util/functions.inc @@ -5,6 +5,18 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/bitset.inc"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/homepage.inc"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/random.inc"; +if (!function_exists("pf_utf8_decode")) { + function pf_utf8_decode(string $string): string { + return iconv("UTF-8", "ISO-8859-1", $string); + } +} + +if (!function_exists("pf_utf8_encode")) { + function pf_utf8_encode(string $string): string { + return iconv("ISO-8859-1", "UTF-8", $string); + } +} + if (!function_exists("getLastFronted")) { function getLastFronted($members, $id) { foreach ($members as $member) { @@ -37,7 +49,7 @@ if (!function_exists("formatPonypush")) { if (!function_exists("generateToken")) { function generateToken(): string { - return str_replace("/", ".", base64_encode(random_bytes(96))); + return "peh" . str_replace("/", ".", base64_encode(random_bytes(96))); } } |