From c30d29faf04f548b8dc992449da82ba85f528f3a Mon Sep 17 00:00:00 2001 From: flashwave Date: Mon, 10 Jun 2019 00:16:34 +0200 Subject: [PATCH] Minor fixes. --- assets/typescript/Forum/Posting.ts | 2 +- src/tpl.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/typescript/Forum/Posting.ts b/assets/typescript/Forum/Posting.ts index ac46bb27..acade6c9 100644 --- a/assets/typescript/Forum/Posting.ts +++ b/assets/typescript/Forum/Posting.ts @@ -157,7 +157,7 @@ function forumPostingPreview( callback(false, 'Failed to render preview.'); } }); - xhr.open('POST', '/forum/posting.php'); + xhr.open('POST', urlFormat('forum-topic-new')); xhr.withCredentials = true; xhr.send(formData); } diff --git a/src/tpl.php b/src/tpl.php index 705a49bc..eceab438 100644 --- a/src/tpl.php +++ b/src/tpl.php @@ -47,7 +47,7 @@ function tpl_sanitise_path(string $path): string return $path; } - return str_replace('.', '/', $path) . MSZ_TPL_FILE_EXT; + return str_replace('.', DIRECTORY_SEPARATOR, $path) . MSZ_TPL_FILE_EXT; } function tpl_exists(string $path): bool