[web-php] master: Set repository language from query parameter (#1257)
| From: | Luffy via GitHub | Date: | Tue, 15 Apr 2025 01:48:24 +0000 |
| Subject: | [web-php] master: Set repository language from query parameter (#1257) | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-32853@lists.php.net to get a copy of this message | ||
Author: Luffy (sy-records)
Committer: GitHub (web-flow)
Pusher: sy-records
Date: 2025-04-15T09:38:31+08:00
Commit: https://github.com/php/web-php/commit/2d4419cfd58e7685dd36a38dde60ae28407c8a2c
Raw diff: https://github.com/php/web-php/commit/2d4419cfd58e7685dd36a38dde60ae28407c8a2c.diff
Set repository language from query parameter (#1257)
Changed paths:
M manual/add-note.php
Diff:
diff --git a/manual/add-note.php b/manual/add-note.php
index 79c18b89d7..4cb6651366 100644
--- a/manual/add-note.php
+++ b/manual/add-note.php
@@ -11,13 +11,16 @@
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';