#3058 #3059 support correct page size and link header

This commit is contained in:
Unknwon 2016-07-04 17:27:06 +08:00
parent 528682a294
commit 4b25bdfbc4
9 changed files with 55 additions and 32 deletions

View file

@ -1521,9 +1521,6 @@ func SearchRepositoryByName(opts *SearchRepoOptions) (repos []*Repository, _ int
}
opts.Keyword = strings.ToLower(opts.Keyword)
if opts.PageSize <= 0 || opts.PageSize > setting.ExplorePagingNum {
opts.PageSize = setting.ExplorePagingNum
}
if opts.Page <= 0 {
opts.Page = 1
}