summaryrefslogtreecommitdiffstats
path: root/routers/web/explore/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/explore/repo.go')
-rw-r--r--routers/web/explore/repo.go28
1 files changed, 14 insertions, 14 deletions
diff --git a/routers/web/explore/repo.go b/routers/web/explore/repo.go
index 78035037e5..a81386b5fd 100644
--- a/routers/web/explore/repo.go
+++ b/routers/web/explore/repo.go
@@ -39,38 +39,38 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
repos []*models.Repository
count int64
err error
- orderBy models.SearchOrderBy
+ orderBy db.SearchOrderBy
)
ctx.Data["SortType"] = ctx.FormString("sort")
switch ctx.FormString("sort") {
case "newest":
- orderBy = models.SearchOrderByNewest
+ orderBy = db.SearchOrderByNewest
case "oldest":
- orderBy = models.SearchOrderByOldest
+ orderBy = db.SearchOrderByOldest
case "recentupdate":
- orderBy = models.SearchOrderByRecentUpdated
+ orderBy = db.SearchOrderByRecentUpdated
case "leastupdate":
- orderBy = models.SearchOrderByLeastUpdated
+ orderBy = db.SearchOrderByLeastUpdated
case "reversealphabetically":
- orderBy = models.SearchOrderByAlphabeticallyReverse
+ orderBy = db.SearchOrderByAlphabeticallyReverse
case "alphabetically":
- orderBy = models.SearchOrderByAlphabetically
+ orderBy = db.SearchOrderByAlphabetically
case "reversesize":
- orderBy = models.SearchOrderBySizeReverse
+ orderBy = db.SearchOrderBySizeReverse
case "size":
- orderBy = models.SearchOrderBySize
+ orderBy = db.SearchOrderBySize
case "moststars":
- orderBy = models.SearchOrderByStarsReverse
+ orderBy = db.SearchOrderByStarsReverse
case "feweststars":
- orderBy = models.SearchOrderByStars
+ orderBy = db.SearchOrderByStars
case "mostforks":
- orderBy = models.SearchOrderByForksReverse
+ orderBy = db.SearchOrderByForksReverse
case "fewestforks":
- orderBy = models.SearchOrderByForks
+ orderBy = db.SearchOrderByForks
default:
ctx.Data["SortType"] = "recentupdate"
- orderBy = models.SearchOrderByRecentUpdated
+ orderBy = db.SearchOrderByRecentUpdated
}
keyword := ctx.FormTrim("q")