From 4daf40505a5f89747982ddd2f1df2a4001720846 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Sat, 6 May 2023 10:04:55 -0400 Subject: 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 --- modules/context/form.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/context') 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) +} -- cgit v1.2.3