summaryrefslogtreecommitdiff
path: root/pages/api/rename.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/api/rename.php')
-rw-r--r--pages/api/rename.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/pages/api/rename.php b/pages/api/rename.php
index abec81e..3aab034 100644
--- a/pages/api/rename.php
+++ b/pages/api/rename.php
@@ -15,7 +15,7 @@ $obj = [
];
global $token;
-$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace("/", "", $token)), true);
+$data = json_decode(pf_utf8_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace("/", "", $token))), true);
$data["name"] = $_POST["name"] ?? $_GET["name"] ?? $data["name"];
$obj["pre_name"] = $data["name"];
@@ -33,5 +33,5 @@ if (json_last_error() === JSON_ERROR_NONE) {
$obj["new_name"] = $data["name"];
-file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace("/", "", $token), json_encode($data));
+file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace("/", "", $token), pf_utf8_encode(json_encode($data)));
die(json_encode($obj)); \ No newline at end of file