Skip to content

Commit 0353407

Browse files
committed
Copy "repo" from GET to POST and set default language to English
1 parent 77616a1 commit 0353407

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

manual/add-note.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,20 @@
1111

1212
site_header("Add Manual Note", ['css' => 'add-note.css']);
1313

14-
// Copy over "sect" and "redirect" from GET to POST
14+
// Copy over "sect", "redirect" and "repo" from GET to POST
1515
if (empty($_POST['sect']) && isset($_GET['sect'])) {
1616
$_POST['sect'] = $_GET['sect'];
1717
}
1818
if (empty($_POST['redirect']) && isset($_GET['redirect'])) {
1919
$_POST['redirect'] = $_GET['redirect'];
2020
}
21-
// Assume English if we didn't get a language
2221
if (empty($_POST['repo']) && isset($_GET['repo'])) {
2322
$_POST['repo'] = $_GET['repo'];
2423
}
24+
// Assume English if we didn't get a language
25+
if (empty($_POST['repo'])) {
26+
$_POST['repo'] = 'en';
27+
}
2528

2629
// Decide on whether all vars are present for processing
2730
$process = true;

0 commit comments

Comments
 (0)