aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/admin/orgs.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/orgs.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/orgs.go')
-rw-r--r--routers/web/admin/orgs.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/web/admin/orgs.go b/routers/web/admin/orgs.go
index 6a3617d67f..d0fd0d5002 100644
--- a/routers/web/admin/orgs.go
+++ b/routers/web/admin/orgs.go
@@ -23,6 +23,10 @@ func Organizations(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("admin.organizations")
ctx.Data["PageIsAdminOrganizations"] = true
+ if ctx.FormString("sort") == "" {
+ ctx.SetFormString("sort", explore.UserSearchDefaultAdminSort)
+ }
+
explore.RenderUserSearch(ctx, &user_model.SearchUserOptions{
Actor: ctx.Doer,
Type: user_model.UserTypeOrganization,