diff options
author | Zettat123 <zettat123@gmail.com> | 2024-11-15 12:36:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-15 04:36:22 +0000 |
commit | a0c0cb3a2c426e39b91e7301c94ddc3a988c8607 (patch) | |
tree | 0ce14dbb920cf3cddf9fe3887feecdfdd843e8c4 /models | |
parent | e1b269e956e955dd1dfb012f40270d73f8329092 (diff) | |
download | gitea-a0c0cb3a2c426e39b91e7301c94ddc3a988c8607.tar.gz gitea-a0c0cb3a2c426e39b91e7301c94ddc3a988c8607.zip |
Fix `recentupdate` sorting bugs (#32505)
Fix #32499
- Add the missing `recentupdate` to `OrderByFlatMap`
- Assign default value(`recentupdate`) to `EXPLORE_PAGING_DEFAULT_SORT`
Diffstat (limited to 'models')
-rw-r--r-- | models/repo/search.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/models/repo/search.go b/models/repo/search.go index a73d9fc215..ffb8e26745 100644 --- a/models/repo/search.go +++ b/models/repo/search.go @@ -36,6 +36,7 @@ var OrderByMap = map[string]map[string]db.SearchOrderBy{ var OrderByFlatMap = map[string]db.SearchOrderBy{ "newest": OrderByMap["desc"]["created"], "oldest": OrderByMap["asc"]["created"], + "recentupdate": OrderByMap["desc"]["updated"], "leastupdate": OrderByMap["asc"]["updated"], "reversealphabetically": OrderByMap["desc"]["alpha"], "alphabetically": OrderByMap["asc"]["alpha"], |