0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-11 04:21:21 +01:00

Fix sort order for organization home and user profile page (#31921) (#31922)

Backport #31921
This commit is contained in:
yp05327 2024-09-02 16:58:18 +09:00 committed by GitHub
parent b5500cded1
commit cc1520221a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -70,6 +70,10 @@ func Home(ctx *context.Context) {
orderBy = db.SearchOrderByForksReverse
case "fewestforks":
orderBy = db.SearchOrderByForks
case "size":
orderBy = db.SearchOrderByGitSize
case "reversesize":
orderBy = db.SearchOrderByGitSizeReverse
default:
ctx.Data["SortType"] = "recentupdate"
orderBy = db.SearchOrderByRecentUpdated

View file

@ -132,6 +132,10 @@ func prepareUserProfileTabData(ctx *context.Context, showPrivate bool, profileDb
orderBy = db.SearchOrderByForksReverse
case "fewestforks":
orderBy = db.SearchOrderByForks
case "size":
orderBy = db.SearchOrderByGitSize
case "reversesize":
orderBy = db.SearchOrderByGitSizeReverse
default:
ctx.Data["SortType"] = "recentupdate"
orderBy = db.SearchOrderByRecentUpdated