summaryrefslogtreecommitdiffstats
path: root/web_src/js/features
diff options
context:
space:
mode:
authorXinyu Zhou <i@sourcehut.net>2022-11-10 10:14:32 +0800
committerGitHub <noreply@github.com>2022-11-10 10:14:32 +0800
commita2a42cd5deb11bc27080ffc4259d6907f0e38061 (patch)
tree58dd4ef58935ae14ea78e2dffc4c7c60add9b091 /web_src/js/features
parent805a14cc91cf1d5ddeb2c23ff1c4176c8badb5c1 (diff)
downloadgitea-a2a42cd5deb11bc27080ffc4259d6907f0e38061.tar.gz
gitea-a2a42cd5deb11bc27080ffc4259d6907f0e38061.zip
Fix UI language switching bug (#21597) (#21749)
Backport #21597 Related: * https://github.com/go-gitea/gitea/pull/21596#issuecomment-1291450224 There was a bug when switching language by AJAX: the irrelevant POST requests were processed by the target page's handler. Now, use GET instead of POST. The GET requests should be harmless. Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'web_src/js/features')
-rw-r--r--web_src/js/features/common-global.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/features/common-global.js b/web_src/js/features/common-global.js
index a3aebc0246..b00b4aea9c 100644
--- a/web_src/js/features/common-global.js
+++ b/web_src/js/features/common-global.js
@@ -37,7 +37,7 @@ export function initHeadNavbarContentToggle() {
export function initFootLanguageMenu() {
function linkLanguageAction() {
const $this = $(this);
- $.post($this.data('url')).always(() => {
+ $.get($this.data('url')).always(() => {
window.location.reload();
});
}