From 2d4419cfd58e7685dd36a38dde60ae28407c8a2c Mon Sep 17 00:00:00 2001 From: Luffy Date: Tue, 15 Apr 2025 09:38:31 +0800 Subject: [PATCH] Set repository language from query parameter (#1257) --- manual/add-note.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/manual/add-note.php b/manual/add-note.php index 79c18b89d..4cb665136 100644 --- a/manual/add-note.php +++ b/manual/add-note.php @@ -11,13 +11,16 @@ use phpweb\UserNotes\UserNote; site_header("Add Manual Note", ['css' => 'add-note.css']); -// Copy over "sect" and "redirect" from GET to POST +// Copy over "sect", "redirect" and "repo" from GET to POST if (empty($_POST['sect']) && isset($_GET['sect'])) { $_POST['sect'] = $_GET['sect']; } if (empty($_POST['redirect']) && isset($_GET['redirect'])) { $_POST['redirect'] = $_GET['redirect']; } +if (empty($_POST['repo']) && isset($_GET['repo'])) { + $_POST['repo'] = $_GET['repo']; +} // Assume English if we didn't get a language if (empty($_POST['repo'])) { $_POST['repo'] = 'en';