aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/admin/users.go
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2023-05-06 10:04:55 -0400
committerGitHub <noreply@github.com>2023-05-06 22:04:55 +0800
commit4daf40505a5f89747982ddd2f1df2a4001720846 (patch)
tree7d4fa0818138bf80c4e28d81bd7ef3fb70b7f0ee /routers/web/admin/users.go
parent46679554d01b0475b4339fb3c5fec96da3a7e202 (diff)
downloadgitea-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 'routers/web/admin/users.go')
-rw-r--r--routers/web/admin/users.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/web/admin/users.go b/routers/web/admin/users.go
index 2150bc42f7..bd31d9d632 100644
--- a/routers/web/admin/users.go
+++ b/routers/web/admin/users.go
@@ -53,7 +53,8 @@ func Users(ctx *context.Context) {
sortType := ctx.FormString("sort")
if sortType == "" {
- sortType = explore.UserSearchDefaultSortType
+ sortType = explore.UserSearchDefaultAdminSort
+ ctx.SetFormString("sort", sortType)
}
ctx.PageData["adminUserListSearchForm"] = map[string]interface{}{
"StatusFilterMap": statusFilterMap,