Skip to content

Commit

Permalink
Get repo list with OrderBy alpha should respect owner too (#30784) (#…
Browse files Browse the repository at this point in the history
…30875)

Backport #30784 by @6543

instead of:
- zowner/gcode
- awesome/nul
- zowner/nul
- zowner/zzz

we will get:
- awesome/nul
- zowner/gcode
- zowner/nul
- zowner/zzz

Co-authored-by: 6543 <6543@obermui.de>
  • Loading branch information
GiteaBot and 6543 authored May 6, 2024
1 parent b22d7fd commit cfe6779
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/repo/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import "code.gitea.io/gitea/models/db"
// SearchOrderByMap represents all possible search order
var SearchOrderByMap = map[string]map[string]db.SearchOrderBy{
"asc": {
"alpha": db.SearchOrderByAlphabetically,
"alpha": "owner_name ASC, name ASC",
"created": db.SearchOrderByOldest,
"updated": db.SearchOrderByLeastUpdated,
"size": db.SearchOrderBySize,
"id": db.SearchOrderByID,
},
"desc": {
"alpha": db.SearchOrderByAlphabeticallyReverse,
"alpha": "owner_name DESC, name DESC",
"created": db.SearchOrderByNewest,
"updated": db.SearchOrderByRecentUpdated,
"size": db.SearchOrderBySizeReverse,
Expand Down

0 comments on commit cfe6779

Please sign in to comment.