diff options
author | Kazuki Sawada <kazuki@6715.jp> | 2017-10-05 14:02:43 +0900 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-10-05 08:02:43 +0300 |
commit | 43253202e9e9b82f04e7726d5719cfc7d0fc5e65 (patch) | |
tree | 1c6699207700cb49cd82d41cf0b00485014ed79c /routers/user/profile.go | |
parent | aa962deec037375a7cfae3b96094becdfe48e778 (diff) | |
download | gitea-43253202e9e9b82f04e7726d5719cfc7d0fc5e65.tar.gz gitea-43253202e9e9b82f04e7726d5719cfc7d0fc5e65.zip |
Change default sort order (#2647)
* sort repositories by `updated_unix` in Explore
* Fix UI problem
* Added missing sort order "newest"
* Change default sort order
* fmt
Diffstat (limited to 'routers/user/profile.go')
-rw-r--r-- | routers/user/profile.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/routers/user/profile.go b/routers/user/profile.go index 50d0c2397f..b0eab09333 100644 --- a/routers/user/profile.go +++ b/routers/user/profile.go @@ -126,12 +126,7 @@ func Profile(ctx *context.Context) { orderBy = models.SearchOrderByAlphabetically default: ctx.Data["SortType"] = "recentupdate" - orderBy = models.SearchOrderByNewest - } - - // set default sort value if sort is empty. - if ctx.Query("sort") == "" { - ctx.Data["SortType"] = "recentupdate" + orderBy = models.SearchOrderByRecentUpdated } keyword := strings.Trim(ctx.Query("q"), " ") |