diff options
author | Unknwon <u@gogs.io> | 2016-07-24 00:23:54 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-07-24 00:23:54 +0800 |
commit | 46e96c008cf966428c9dad71c7871de88186e3fe (patch) | |
tree | 57e276d8f971c74a6dac841352ec2bee96e93d8f /models/user.go | |
parent | 256cd6374adf646a46265efe18a2d3f822bf7269 (diff) | |
download | gitea-46e96c008cf966428c9dad71c7871de88186e3fe.tar.gz gitea-46e96c008cf966428c9dad71c7871de88186e3fe.zip |
Use struct for UI settings
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/user.go b/models/user.go index 1050f2231c..44dedccadf 100644 --- a/models/user.go +++ b/models/user.go @@ -988,7 +988,7 @@ type SearchUserOptions struct { Type UserType OrderBy string Page int - PageSize int // Can be smaller than or equal to setting.ExplorePagingNum + PageSize int // Can be smaller than or equal to setting.UI.ExplorePagingNum } // SearchUserByName takes keyword and part of user name to search, @@ -999,8 +999,8 @@ func SearchUserByName(opts *SearchUserOptions) (users []*User, _ int64, _ error) } opts.Keyword = strings.ToLower(opts.Keyword) - if opts.PageSize <= 0 || opts.PageSize > setting.ExplorePagingNum { - opts.PageSize = setting.ExplorePagingNum + if opts.PageSize <= 0 || opts.PageSize > setting.UI.ExplorePagingNum { + opts.PageSize = setting.UI.ExplorePagingNum } if opts.Page <= 0 { opts.Page = 1 |