diff options
author | techknowlogick <techknowlogick@gitea.io> | 2023-05-06 10:04:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-06 22:04:55 +0800 |
commit | 4daf40505a5f89747982ddd2f1df2a4001720846 (patch) | |
tree | 7d4fa0818138bf80c4e28d81bd7ef3fb70b7f0ee /modules | |
parent | 46679554d01b0475b4339fb3c5fec96da3a7e202 (diff) | |
download | gitea-4daf40505a5f89747982ddd2f1df2a4001720846.tar.gz gitea-4daf40505a5f89747982ddd2f1df2a4001720846.zip |
Sort users and orgs on explore by recency by default (#24279)
This gives more "freshness" to the explore page. So it's not just the
same X users on the explore page by default, now it matches the same
sort as the repos on the explore page.
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/context/form.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/context/form.go b/modules/context/form.go index f9c4ab6a98..5c02152582 100644 --- a/modules/context/form.go +++ b/modules/context/form.go @@ -65,3 +65,8 @@ func (ctx *Context) FormOptionalBool(key string) util.OptionalBool { v = v || strings.EqualFold(s, "on") return util.OptionalBoolOf(v) } + +func (ctx *Context) SetFormString(key, value string) { + _ = ctx.Req.FormValue(key) // force parse form + ctx.Req.Form.Set(key, value) +} |