]> source.dussan.org Git - gitea.git/commitdiff
Use named const instead of a raw string (#5115)
authorOleg Kovalov <iamolegkovalov@gmail.com>
Sat, 20 Oct 2018 02:25:38 +0000 (04:25 +0200)
committerLunny Xiao <xiaolunwen@gmail.com>
Sat, 20 Oct 2018 02:25:38 +0000 (10:25 +0800)
models/user.go

index 45bd4445ee0ddaffa6ed699afe430005d455ebaf..32e7dda2cb3d2a0ad69d8ec680242b50b74ff5f7 100644 (file)
@@ -1380,7 +1380,7 @@ func SearchUsers(opts *SearchUserOptions) (users []*User, _ int64, _ error) {
                opts.Page = 1
        }
        if len(opts.OrderBy) == 0 {
-               opts.OrderBy = "name ASC"
+               opts.OrderBy = SearchOrderByAlphabetically
        }
 
        users = make([]*User, 0, opts.PageSize)