summaryrefslogtreecommitdiff
path: root/includes/util/functions.inc
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-07-04 09:01:50 +0200
committerRaindropsSys <contact@minteck.org>2023-07-04 09:01:50 +0200
commitf4d52a3f0c35968b2007c808da6fd409d50fe8aa (patch)
tree72901c7cea443f4769f9b01cfda79c5fbf03d493 /includes/util/functions.inc
parent7ceb1d721e1e084be80d3ce7342bc05e2ebcbd1e (diff)
downloadpluralconnect-f4d52a3f0c35968b2007c808da6fd409d50fe8aa.tar.gz
pluralconnect-f4d52a3f0c35968b2007c808da6fd409d50fe8aa.tar.bz2
pluralconnect-f4d52a3f0c35968b2007c808da6fd409d50fe8aa.zip
Updated 5 files (automated)
Diffstat (limited to 'includes/util/functions.inc')
-rw-r--r--includes/util/functions.inc14
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)));
}
}