From f4d52a3f0c35968b2007c808da6fd409d50fe8aa Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Tue, 4 Jul 2023 09:01:50 +0200 Subject: Updated 5 files (automated) --- includes/util/functions.inc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'includes/util/functions.inc') 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))); } } -- cgit